<Style x:Key="RowStyleWithAlternation" TargetType="DataGridRow"> <Setter Property="SnapsToDevicePixels" Value="True" /> <Setter Property="Background" Value="GhostWhite"/> <Setter Property="FontWeight" Value="Normal"/> <Setter Property="ContextMenu" Value="{x:Null}"/> <Style.Triggers> <Trigger Property="AlternationIndex" Value="1"> <Setter Property="Background" Value="#FFD0D0E0"/> </Trigger> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="#F9F99F"/> </Trigger> <Trigger Property="IsSelected" Value="True"> <Setter Property="Background" Value="#F9F99F" /> </Trigger> <Trigger Property="Validation.HasError" Value="True" > <Setter Property="Effect"> <Setter.Value> <DropShadowEffect Color="Red" ShadowDepth="0" BlurRadius="20" /> </Setter.Value> </Setter> <Setter Property="BorderThickness" Value="2" /> <Setter Property="BorderBrush" Value="Red" /> <Setter Property="Foreground" Value="Blue" /> <Setter Property="FontSize" Value="12" /> </Trigger> </Style.Triggers> </Style>
C# | MVC | DotnetCore | Web API | Blazor | HTML | BootStrap | JavaScript | JQuery | EF | Angular | SQL | Azure
Tuesday, 5 August 2014
WPF DataGrid RowStyle (AlternationIndex)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment