|
|
@ -93,58 +93,66 @@ |
|
|
<Setter Property="Focusable" Value="False" /> |
|
|
<Setter Property="Focusable" Value="False" /> |
|
|
<Setter Property="Template"> |
|
|
<Setter Property="Template"> |
|
|
<ControlTemplate> |
|
|
<ControlTemplate> |
|
|
<Grid x:Name="PART_CellRoot" |
|
|
<Border x:Name="CellBorder" |
|
|
ColumnDefinitions="*,Auto" |
|
|
Background="{TemplateBinding Background}" |
|
|
Background="{TemplateBinding Background}"> |
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}" |
|
|
|
|
|
CornerRadius="{TemplateBinding CornerRadius}"> |
|
|
|
|
|
<Grid x:Name="PART_CellRoot" ColumnDefinitions="*,Auto"> |
|
|
|
|
|
|
|
|
<Rectangle x:Name="CurrencyVisual" |
|
|
<Rectangle x:Name="CurrencyVisual" |
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
|
VerticalAlignment="Stretch" |
|
|
|
|
|
Fill="Transparent" |
|
|
|
|
|
IsHitTestVisible="False" |
|
|
|
|
|
Stroke="{DynamicResource DataGridCurrencyVisualPrimaryBrush}" |
|
|
|
|
|
StrokeThickness="1" /> |
|
|
|
|
|
<Grid x:Name="FocusVisual" |
|
|
|
|
|
IsHitTestVisible="False"> |
|
|
|
|
|
<Rectangle HorizontalAlignment="Stretch" |
|
|
|
|
|
VerticalAlignment="Stretch" |
|
|
|
|
|
Fill="Transparent" |
|
|
|
|
|
IsHitTestVisible="False" |
|
|
|
|
|
Stroke="{DynamicResource DataGridCellFocusVisualPrimaryBrush}" |
|
|
|
|
|
StrokeThickness="2" /> |
|
|
|
|
|
<Rectangle Margin="2" |
|
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
HorizontalAlignment="Stretch" |
|
|
VerticalAlignment="Stretch" |
|
|
VerticalAlignment="Stretch" |
|
|
Fill="Transparent" |
|
|
Fill="Transparent" |
|
|
IsHitTestVisible="False" |
|
|
IsHitTestVisible="False" |
|
|
Stroke="{DynamicResource DataGridCellFocusVisualSecondaryBrush}" |
|
|
Stroke="{DynamicResource DataGridCurrencyVisualPrimaryBrush}" |
|
|
StrokeThickness="1" /> |
|
|
StrokeThickness="1" /> |
|
|
</Grid> |
|
|
<Grid x:Name="FocusVisual" IsHitTestVisible="False"> |
|
|
|
|
|
<Rectangle HorizontalAlignment="Stretch" |
|
|
|
|
|
VerticalAlignment="Stretch" |
|
|
|
|
|
Fill="Transparent" |
|
|
|
|
|
IsHitTestVisible="False" |
|
|
|
|
|
Stroke="{DynamicResource DataGridCellFocusVisualPrimaryBrush}" |
|
|
|
|
|
StrokeThickness="2" /> |
|
|
|
|
|
<Rectangle Margin="2" |
|
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
|
VerticalAlignment="Stretch" |
|
|
|
|
|
Fill="Transparent" |
|
|
|
|
|
IsHitTestVisible="False" |
|
|
|
|
|
Stroke="{DynamicResource DataGridCellFocusVisualSecondaryBrush}" |
|
|
|
|
|
StrokeThickness="1" /> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
|
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" |
|
|
<ContentPresenter Margin="{TemplateBinding Padding}" |
|
|
Content="{TemplateBinding Content}" |
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
Margin="{TemplateBinding Padding}" |
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|
|
TextElement.Foreground="{TemplateBinding Foreground}" |
|
|
Content="{TemplateBinding Content}" |
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
ContentTemplate="{TemplateBinding ContentTemplate}" |
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" /> |
|
|
Foreground="{TemplateBinding Foreground}" /> |
|
|
|
|
|
|
|
|
<Rectangle x:Name="InvalidVisualElement" |
|
|
<Rectangle x:Name="InvalidVisualElement" |
|
|
HorizontalAlignment="Stretch" |
|
|
HorizontalAlignment="Stretch" |
|
|
VerticalAlignment="Stretch" |
|
|
VerticalAlignment="Stretch" |
|
|
IsHitTestVisible="False" |
|
|
IsHitTestVisible="False" |
|
|
Stroke="{DynamicResource DataGridCellInvalidBrush}" |
|
|
Stroke="{DynamicResource DataGridCellInvalidBrush}" |
|
|
StrokeThickness="1" /> |
|
|
StrokeThickness="1" /> |
|
|
|
|
|
|
|
|
<Rectangle Name="PART_RightGridLine" |
|
|
<Rectangle Name="PART_RightGridLine" |
|
|
Grid.Column="1" |
|
|
Grid.Column="1" |
|
|
VerticalAlignment="Stretch" |
|
|
Width="1" |
|
|
Width="1" |
|
|
VerticalAlignment="Stretch" |
|
|
Fill="{DynamicResource DataGridFillerColumnGridLinesBrush}" /> |
|
|
Fill="{DynamicResource DataGridFillerColumnGridLinesBrush}" /> |
|
|
</Grid> |
|
|
</Grid> |
|
|
|
|
|
</Border> |
|
|
</ControlTemplate> |
|
|
</ControlTemplate> |
|
|
</Setter> |
|
|
</Setter> |
|
|
</Style> |
|
|
</Style> |
|
|
|
|
|
|
|
|
|
|
|
<Style Selector="DataGridCell > TextBlock#CellTextBlock"> |
|
|
|
|
|
<Setter Property="Margin" Value="{DynamicResource DataGridTextColumnCellTextBlockMargin}" /> |
|
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center" /> |
|
|
|
|
|
</Style> |
|
|
|
|
|
|
|
|
<Style Selector="DataGridCell /template/ Rectangle#CurrencyVisual"> |
|
|
<Style Selector="DataGridCell /template/ Rectangle#CurrencyVisual"> |
|
|
<Setter Property="IsVisible" Value="False" /> |
|
|
<Setter Property="IsVisible" Value="False" /> |
|
|
</Style> |
|
|
</Style> |
|
|
@ -180,57 +188,58 @@ |
|
|
<Setter Property="MinHeight" Value="32" /> |
|
|
<Setter Property="MinHeight" Value="32" /> |
|
|
<Setter Property="Template"> |
|
|
<Setter Property="Template"> |
|
|
<ControlTemplate> |
|
|
<ControlTemplate> |
|
|
<Grid Name="PART_ColumnHeaderRoot" |
|
|
<Border x:Name="HeaderBorder" |
|
|
ColumnDefinitions="*,Auto" |
|
|
Background="{TemplateBinding Background}" |
|
|
Background="{TemplateBinding Background}"> |
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}" |
|
|
<Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
CornerRadius="{TemplateBinding CornerRadius}"> |
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|
|
<Grid Name="PART_ColumnHeaderRoot" ColumnDefinitions="*,Auto"> |
|
|
Margin="{TemplateBinding Padding}"> |
|
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
<Grid Margin="{TemplateBinding Padding}" |
|
|
<ColumnDefinition Width="*" /> |
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
<ColumnDefinition MinWidth="32" |
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> |
|
|
Width="Auto" /> |
|
|
<Grid.ColumnDefinitions> |
|
|
</Grid.ColumnDefinitions> |
|
|
<ColumnDefinition Width="*" /> |
|
|
|
|
|
<ColumnDefinition Width="Auto" MinWidth="32" /> |
|
|
<ContentPresenter Content="{TemplateBinding Content}" |
|
|
</Grid.ColumnDefinitions> |
|
|
ContentTemplate="{TemplateBinding ContentTemplate}" /> |
|
|
|
|
|
|
|
|
<ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" /> |
|
|
<Path Name="SortIcon" |
|
|
|
|
|
Grid.Column="1" |
|
|
<Path Name="SortIcon" |
|
|
Fill="{TemplateBinding Foreground}" |
|
|
Grid.Column="1" |
|
|
HorizontalAlignment="Center" |
|
|
Height="12" |
|
|
VerticalAlignment="Center" |
|
|
HorizontalAlignment="Center" |
|
|
Stretch="Uniform" |
|
|
VerticalAlignment="Center" |
|
|
Height="12" /> |
|
|
Fill="{TemplateBinding Foreground}" |
|
|
</Grid> |
|
|
Stretch="Uniform" /> |
|
|
|
|
|
</Grid> |
|
|
<Rectangle Name="VerticalSeparator" |
|
|
|
|
|
Grid.Column="1" |
|
|
|
|
|
Width="1" |
|
|
|
|
|
VerticalAlignment="Stretch" |
|
|
|
|
|
Fill="{TemplateBinding SeparatorBrush}" |
|
|
|
|
|
IsVisible="{TemplateBinding AreSeparatorsVisible}" /> |
|
|
|
|
|
|
|
|
|
|
|
<Grid x:Name="FocusVisual" |
|
|
<Rectangle Name="VerticalSeparator" |
|
|
IsHitTestVisible="False"> |
|
|
Grid.Column="1" |
|
|
<Rectangle x:Name="FocusVisualPrimary" |
|
|
Width="1" |
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
|
VerticalAlignment="Stretch" |
|
|
VerticalAlignment="Stretch" |
|
|
Fill="Transparent" |
|
|
Fill="{TemplateBinding SeparatorBrush}" |
|
|
IsHitTestVisible="False" |
|
|
IsVisible="{TemplateBinding AreSeparatorsVisible}" /> |
|
|
Stroke="{DynamicResource DataGridCellFocusVisualPrimaryBrush}" |
|
|
|
|
|
StrokeThickness="2" /> |
|
|
<Grid x:Name="FocusVisual" IsHitTestVisible="False"> |
|
|
<Rectangle x:Name="FocusVisualSecondary" |
|
|
<Rectangle x:Name="FocusVisualPrimary" |
|
|
Margin="2" |
|
|
HorizontalAlignment="Stretch" |
|
|
HorizontalAlignment="Stretch" |
|
|
VerticalAlignment="Stretch" |
|
|
VerticalAlignment="Stretch" |
|
|
Fill="Transparent" |
|
|
Fill="Transparent" |
|
|
IsHitTestVisible="False" |
|
|
IsHitTestVisible="False" |
|
|
Stroke="{DynamicResource DataGridCellFocusVisualPrimaryBrush}" |
|
|
Stroke="{DynamicResource DataGridCellFocusVisualSecondaryBrush}" |
|
|
StrokeThickness="2" /> |
|
|
StrokeThickness="1" /> |
|
|
<Rectangle x:Name="FocusVisualSecondary" |
|
|
|
|
|
Margin="2" |
|
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
|
VerticalAlignment="Stretch" |
|
|
|
|
|
Fill="Transparent" |
|
|
|
|
|
IsHitTestVisible="False" |
|
|
|
|
|
Stroke="{DynamicResource DataGridCellFocusVisualSecondaryBrush}" |
|
|
|
|
|
StrokeThickness="1" /> |
|
|
|
|
|
</Grid> |
|
|
</Grid> |
|
|
</Grid> |
|
|
</Grid> |
|
|
</Border> |
|
|
</ControlTemplate> |
|
|
</ControlTemplate> |
|
|
</Setter> |
|
|
</Setter> |
|
|
</Style> |
|
|
</Style> |
|
|
@ -271,38 +280,51 @@ |
|
|
<Setter Property="Focusable" Value="False" /> |
|
|
<Setter Property="Focusable" Value="False" /> |
|
|
<Setter Property="Template"> |
|
|
<Setter Property="Template"> |
|
|
<ControlTemplate> |
|
|
<ControlTemplate> |
|
|
<DataGridFrozenGrid Name="PART_Root" |
|
|
<Border x:Name="RowBorder" |
|
|
RowDefinitions="*,Auto,Auto" |
|
|
Background="{TemplateBinding Background}" |
|
|
ColumnDefinitions="Auto,*"> |
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}" |
|
|
<Rectangle Name="BackgroundRectangle" |
|
|
CornerRadius="{TemplateBinding CornerRadius}"> |
|
|
Grid.RowSpan="2" |
|
|
<DataGridFrozenGrid Name="PART_Root" |
|
|
Grid.ColumnSpan="2" /> |
|
|
ColumnDefinitions="Auto,*" |
|
|
<Rectangle x:Name="InvalidVisualElement" |
|
|
RowDefinitions="*,Auto,Auto"> |
|
|
Grid.ColumnSpan="2" |
|
|
|
|
|
Fill="{DynamicResource DataGridRowInvalidBrush}" /> |
|
|
<Rectangle Name="BackgroundRectangle" |
|
|
|
|
|
Grid.RowSpan="2" |
|
|
<DataGridRowHeader Name="PART_RowHeader" |
|
|
Grid.ColumnSpan="2" /> |
|
|
Grid.RowSpan="3" |
|
|
<Rectangle x:Name="InvalidVisualElement" |
|
|
DataGridFrozenGrid.IsFrozen="True" /> |
|
|
Grid.ColumnSpan="2" |
|
|
<DataGridCellsPresenter Name="PART_CellsPresenter" |
|
|
Fill="{DynamicResource DataGridRowInvalidBrush}" /> |
|
|
Grid.Column="1" |
|
|
|
|
|
DataGridFrozenGrid.IsFrozen="True" /> |
|
|
<DataGridRowHeader Name="PART_RowHeader" |
|
|
<DataGridDetailsPresenter Name="PART_DetailsPresenter" |
|
|
Grid.RowSpan="3" |
|
|
Grid.Row="1" |
|
|
DataGridFrozenGrid.IsFrozen="True" /> |
|
|
|
|
|
<DataGridCellsPresenter Name="PART_CellsPresenter" |
|
|
Grid.Column="1" |
|
|
Grid.Column="1" |
|
|
Background="{DynamicResource DataGridDetailsPresenterBackgroundBrush}" /> |
|
|
DataGridFrozenGrid.IsFrozen="True" /> |
|
|
<Rectangle Name="PART_BottomGridLine" |
|
|
<DataGridDetailsPresenter Name="PART_DetailsPresenter" |
|
|
Grid.Row="2" |
|
|
Grid.Row="1" |
|
|
Grid.Column="1" |
|
|
Grid.Column="1" |
|
|
HorizontalAlignment="Stretch" |
|
|
Background="{DynamicResource DataGridDetailsPresenterBackgroundBrush}" /> |
|
|
Height="1" /> |
|
|
<Rectangle Name="PART_BottomGridLine" |
|
|
|
|
|
Grid.Row="2" |
|
|
|
|
|
Grid.Column="1" |
|
|
|
|
|
Height="1" |
|
|
|
|
|
HorizontalAlignment="Stretch" /> |
|
|
|
|
|
|
|
|
</DataGridFrozenGrid> |
|
|
</DataGridFrozenGrid> |
|
|
|
|
|
</Border> |
|
|
</ControlTemplate> |
|
|
</ControlTemplate> |
|
|
</Setter> |
|
|
</Setter> |
|
|
</Style> |
|
|
</Style> |
|
|
|
|
|
|
|
|
|
|
|
<Style Selector="DataGridRow"> |
|
|
|
|
|
<Setter Property="Background" Value="{Binding $parent[DataGrid].RowBackground}" /> |
|
|
|
|
|
</Style> |
|
|
|
|
|
<Style Selector="DataGridRow:nth-child(even)"> |
|
|
|
|
|
<Setter Property="Background" Value="{Binding $parent[DataGrid].AlternatingRowBackground}" /> |
|
|
|
|
|
</Style> |
|
|
|
|
|
|
|
|
<Style Selector="DataGridRow /template/ Rectangle#InvalidVisualElement"> |
|
|
<Style Selector="DataGridRow /template/ Rectangle#InvalidVisualElement"> |
|
|
<Setter Property="Opacity" Value="0" /> |
|
|
<Setter Property="Opacity" Value="0" /> |
|
|
</Style> |
|
|
</Style> |
|
|
@ -430,9 +452,12 @@ |
|
|
Width="12" |
|
|
Width="12" |
|
|
Height="12" |
|
|
Height="12" |
|
|
Margin="12,0,0,0" |
|
|
Margin="12,0,0,0" |
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}" |
|
|
Background="{TemplateBinding Background}" |
|
|
Background="{TemplateBinding Background}" |
|
|
Foreground="{TemplateBinding Foreground}" |
|
|
CornerRadius="{TemplateBinding CornerRadius}" |
|
|
Focusable="False" /> |
|
|
Focusable="False" |
|
|
|
|
|
Foreground="{TemplateBinding Foreground}" /> |
|
|
|
|
|
|
|
|
<StackPanel Grid.Column="3" |
|
|
<StackPanel Grid.Column="3" |
|
|
Orientation="Horizontal" |
|
|
Orientation="Horizontal" |
|
|
@ -559,11 +584,12 @@ |
|
|
</Setter> |
|
|
</Setter> |
|
|
<Setter Property="Template"> |
|
|
<Setter Property="Template"> |
|
|
<ControlTemplate> |
|
|
<ControlTemplate> |
|
|
<Border Background="{TemplateBinding Background}" |
|
|
<Border x:Name="DataGridBorder" |
|
|
|
|
|
Background="{TemplateBinding Background}" |
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
BorderThickness="{TemplateBinding BorderThickness}" |
|
|
BorderThickness="{TemplateBinding BorderThickness}" |
|
|
BorderBrush="{TemplateBinding BorderBrush}"> |
|
|
CornerRadius="{TemplateBinding CornerRadius}"> |
|
|
<Grid RowDefinitions="Auto,*,Auto,Auto" |
|
|
<Grid ColumnDefinitions="Auto,*,Auto" RowDefinitions="Auto,*,Auto,Auto"> |
|
|
ColumnDefinitions="Auto,*,Auto"> |
|
|
|
|
|
<Grid.Resources> |
|
|
<Grid.Resources> |
|
|
<ControlTemplate x:Key="TopLeftHeaderTemplate" |
|
|
<ControlTemplate x:Key="TopLeftHeaderTemplate" |
|
|
TargetType="DataGridColumnHeader"> |
|
|
TargetType="DataGridColumnHeader"> |
|
|
|