|
121 | 121 | Padding="{TemplateBinding Padding}"
|
122 | 122 | HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
123 | 123 | VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
124 |
| - Background="Transparent" |
125 | 124 | BorderBrush="Transparent"
|
126 | 125 | BorderThickness="0"
|
127 | 126 | SnapsToDevicePixels="True">
|
|
157 | 156 | <Style x:Key="DefaultDataGridRowStyle" TargetType="{x:Type DataGridRow}">
|
158 | 157 | <Setter Property="Margin" Value="0,2" />
|
159 | 158 | <Setter Property="Padding" Value="4" />
|
160 |
| - <Setter Property="Background" Value="Transparent" /> |
161 | 159 | <Setter Property="BorderBrush" Value="Transparent" />
|
162 | 160 | <Setter Property="IsTabStop" Value="False" />
|
163 | 161 | <Setter Property="SnapsToDevicePixels" Value="True" />
|
|
182 | 180 | <ControlTemplate TargetType="{x:Type DataGridRow}">
|
183 | 181 | <Border
|
184 | 182 | x:Name="DGR_Border"
|
185 |
| - Background="Transparent" |
186 | 183 | BorderBrush="{TemplateBinding BorderBrush}"
|
187 | 184 | BorderThickness="{TemplateBinding BorderThickness}"
|
188 | 185 | CornerRadius="{DynamicResource ControlCornerRadius}"
|
|
376 | 373 | </VisualStateGroup>
|
377 | 374 | </VisualStateManager.VisualStateGroups>
|
378 | 375 | </Border>
|
| 376 | + |
379 | 377 | <ControlTemplate.Triggers>
|
| 378 | + <Trigger Property="AlternationIndex" Value="0"> |
| 379 | + <Setter TargetName="DGR_Border" Property="Background" Value="{Binding RowBackground, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" /> |
| 380 | + </Trigger> |
| 381 | + <Trigger Property="AlternationIndex" Value="1"> |
| 382 | + <Setter TargetName="DGR_Border" Property="Background" Value="{Binding AlternatingRowBackground, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" /> |
| 383 | + </Trigger> |
380 | 384 | <MultiTrigger>
|
381 | 385 | <MultiTrigger.Conditions>
|
382 | 386 | <Condition Property="IsEnabled" Value="True" />
|
|
0 commit comments