Datagrid


<ResourceDictionary xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”&gt;

<Style TargetType=”{x:Type DataGridColumnHeader}”>
<Setter Property=”Background” Value=”{StaticResource PrimaryBrush}” />
<Setter Property=”Foreground” Value=”{StaticResource BackgroundBrush}” />
<Setter Property=”Height” Value=”30″ />
<Setter Property=”HorizontalContentAlignment” Value=”Center” />
<Setter Property=”Template”>
<Setter.Value>
<ControlTemplate TargetType=”{x:Type DataGridColumnHeader}”>

<Border
Background=”{TemplateBinding Background}”>
<Grid>
<TextBlock Text=”{TemplateBinding Content}”
VerticalAlignment=”Center”
Foreground=”{TemplateBinding Foreground}”
HorizontalAlignment=”Center” />
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style TargetType=”{x:Type DataGridCell}”>
<Setter Property=”Foreground” Value=”{StaticResource ForegroundMainBrush}” />
<Setter Property=”Background” Value=”{StaticResource BackgroundBrush}” />
<Setter Property=”HorizontalContentAlignment” Value=”Stretch” />
<Setter Property=”FontFamily” Value=”{StaticResource fontPrimary}” />
<Style.Triggers>
<Trigger Property=”IsSelected” Value=”True”>
<Setter Property=”Background” Value=”{StaticResource SecondaryBrush}” />
</Trigger>
</Style.Triggers>
</Style>

<Style TargetType=”{x:Type DataGridRow}”>
<Setter Property=”Foreground” Value=”{StaticResource ForegroundMainBrush}” />
<Setter Property=”Background” Value=”{StaticResource BackgroundBrush}” />
<Setter Property=”Height” Value=”auto” />
<Setter Property=”HorizontalContentAlignment” Value=”Stretch” />

<Style.Triggers>
<Trigger Property=”IsSelected” Value=”True”>
<Setter Property=”Background” Value=”{StaticResource SecondaryBrush}” />
</Trigger>
<Trigger Property=”ItemsControl.AlternationIndex” Value=”0″>
<Setter Property=”Background” Value=”{StaticResource BackgroundBrush}” />
</Trigger>
<Trigger Property=”ItemsControl.AlternationIndex” Value=”1″>
<Setter Property=”Background” Value=”{StaticResource BackgroundBrush}” />
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>