Last active
January 20, 2019 12:37
-
-
Save yavor87/34fc695ab059b4f34c49651257046511 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Grid> | |
<Grid.Resources> | |
<Style TargetType="{x:Type telerik:GridViewCell}" BasedOn="{StaticResource GridViewCellStyle}"> | |
<Setter Property="Background" Value="#ffcc00"/> | |
</Style> | |
<Style TargetType="{x:Type telerik:GridViewHeaderCell}" BasedOn="{StaticResource GridViewHeaderCellStyle}"> | |
<Setter Property="Background" Value="LimeGreen"/> | |
<Setter Property="Foreground" Value="Cyan"/> | |
</Style> | |
</Grid.Resources> | |
<telerik:RadGridView ItemsSource="{x:Static local:SampleData.Employees}" AutoGenerateColumns="False"> | |
<telerik:RadGridView.Columns> | |
<telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding FullName}" /> | |
<telerik:GridViewDataColumn Header="Department" DataMemberBinding="{Binding Department}" /> | |
<telerik:GridViewDataColumn Header="Salary" DataMemberBinding="{Binding Salary}" DataFormatString="{}{0:C0}"> | |
<telerik:GridViewDataColumn.CellStyle> | |
<Style TargetType="{x:Type telerik:GridViewCell}" BasedOn="{StaticResource GridViewCellStyle}"> | |
<Setter Property="Background" Value="Green"/> | |
<Style.Triggers> | |
<Trigger Property="IsSelected" Value="True"> | |
<Setter Property="Background" Value="Red"/> | |
</Trigger> | |
</Style.Triggers> | |
</Style> | |
</telerik:GridViewDataColumn.CellStyle> | |
</telerik:GridViewDataColumn> | |
</telerik:RadGridView.Columns> | |
</telerik:RadGridView> | |
</Grid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<telerik:RadGridView ShowGroupPanel="False" GridLinesVisibility="Vertical" | |
ShowColumnHeaders="False" ColumnBackground="Bisque" | |
RowIndicatorVisibility="Collapsed"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Grid> | |
<Grid.Resources> | |
<Style TargetType="{x:Type telerik:RadGridView}" BasedOn="{StaticResource RadGridViewStyle}"> | |
<Setter Property="ShowGroupPanel" Value="False" /> | |
<Setter Property="GridLinesVisibility" Value="Vertical" /> | |
<Setter Property="ShowColumnHeaders" Value="False" /> | |
<Setter Property="ColumnBackground" Value="Bisque" /> | |
<Setter Property="RowIndicatorVisibility" Value="Collapsed" /> | |
</Style> | |
</Grid.Resources> | |
<telerik:RadGridView /> | |
</Grid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Grid> | |
<Grid.Resources> | |
<Style x:Key="MyGridRowStyle" TargetType="{x:Type telerik:GridViewRow}" BasedOn="{StaticResource GridViewRowStyle}"> | |
<Style.Triggers> | |
<Trigger Property="IsSelected" Value="True"> | |
<Setter Property="Foreground" Value="Red" /> | |
</Trigger> | |
</Style.Triggers> | |
</Style> | |
<Style TargetType="{x:Type telerik:GridViewRow}" BasedOn="{StaticResource MyGridRowStyle}"> | |
<Setter Property="Background" Value="SeaGreen"/> | |
</Style> | |
<Style TargetType="{x:Type telerik:GridViewHeaderRow}" BasedOn="{StaticResource GridViewHeaderRowStyle}"> | |
<Setter Property="Background" Value="MidnightBlue"/> | |
</Style> | |
</Grid.Resources> | |
<telerik:RadGridView ItemsSource="{x:Static local:SampleData.Employees}" AlternationCount="2"> | |
<telerik:RadGridView.AlternateRowStyle> | |
<Style TargetType="{x:Type telerik:GridViewRow}" BasedOn="{StaticResource MyGridRowStyle}"> | |
<Setter Property="Background" Value="LightGoldenrodYellow" /> | |
</Style> | |
</telerik:RadGridView.AlternateRowStyle> | |
</telerik:RadGridView> | |
</Grid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment