前提・実現したいこと
以下画像のように値部分しか背景色が設定されません。
値のない部分(数値の左)にも背景色を設定するにはどの様にすれば良いでしょうか。
xaml
1<DataGrid AutoGenerateColumns="False" ItemsSource="{Binding Data}"> 2 <DataGrid.Columns> 3 <DataGridTextColumn Binding="{Binding Value1}" Header="値1"> 4 <DataGridTextColumn.ElementStyle> 5 <Style TargetType="{x:Type TextBlock}"> 6 <Setter Property="HorizontalAlignment" Value="Right" /> 7 <Setter Property="Background" Value="YellowGreen" /> 8 </Style> 9 </DataGridTextColumn.ElementStyle> 10 </DataGridTextColumn> 11 </DataGrid.Columns> 12</DataGrid> 13
よろしくおねがいします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/08/28 20:56