564 lines
27 KiB
Plaintext
Raw Normal View History

2023-02-05 23:26:45 +08:00
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:collections="using:Avalonia.Collections"
x:CompileBindings="True">
2023-02-05 23:07:45 +08:00
<!-- Add Resources Here -->
2023-02-05 23:26:45 +08:00
<ControlTheme x:Key="DataGridCellTextBlockTheme" TargetType="TextBlock">
2023-02-08 02:00:06 +08:00
<Setter Property="Margin" Value="{DynamicResource DataGridCellTextBlockDefaultMargin}" />
2023-02-05 23:26:45 +08:00
<Setter Property="VerticalAlignment" Value="Center" />
</ControlTheme>
<ControlTheme
x:Key="DataGridCellTextBoxTheme"
BasedOn="{StaticResource {x:Type TextBox}}"
TargetType="TextBox">
<Setter Property="VerticalAlignment" Value="Stretch" />
<Style Selector="^ /template/ DataValidationErrors">
<Setter Property="Theme" Value="{DynamicResource TooltipDataValidationErrors}" />
</Style>
</ControlTheme>
<ControlTheme x:Key="{x:Type DataGridCell}" TargetType="DataGridCell">
2023-02-08 02:00:06 +08:00
<Setter Property="Background" Value="{DynamicResource DataGridCellBackground}" />
2023-02-05 23:26:45 +08:00
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
2023-02-08 02:00:06 +08:00
<Setter Property="MinHeight" Value="{DynamicResource DataGridCellMinHeight}" />
2023-02-05 23:26:45 +08:00
<Setter Property="Focusable" Value="False" />
<Setter Property="Template">
<ControlTemplate>
<Border
x:Name="CellBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid x:Name="PART_CellRoot" ColumnDefinitions="*,Auto">
<Rectangle
x:Name="CurrencyVisual"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Fill="Transparent"
IsHitTestVisible="False"
IsVisible="False"
2023-02-08 02:00:06 +08:00
Stroke="{DynamicResource DataGridCellCurrentBorderBrush}"
StrokeThickness="{DynamicResource DataGridCellVisualStrokeThickness}" />
<Panel
2023-02-05 23:26:45 +08:00
x:Name="FocusVisual"
Grid.Column="0"
IsHitTestVisible="False"
IsVisible="False">
<Rectangle
2023-02-08 02:00:06 +08:00
Margin="{DynamicResource DataGridCellVisualBorderThickness}"
2023-02-05 23:26:45 +08:00
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Fill="Transparent"
IsHitTestVisible="False"
2023-02-08 02:00:06 +08:00
Stroke="{DynamicResource DataGridCellFocusBorderBrush}"
StrokeThickness="{DynamicResource DataGridCellVisualStrokeThickness}" />
</Panel>
2023-02-05 23:26:45 +08:00
<ContentPresenter
Grid.Column="0"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Foreground="{TemplateBinding Foreground}" />
<Rectangle
x:Name="InvalidVisualElement"
Grid.Column="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
IsHitTestVisible="False"
IsVisible="False"
2023-02-08 02:00:06 +08:00
Stroke="{DynamicResource DataGridCellErrorBrush}"
StrokeThickness="{DynamicResource DataGridCellVisualStrokeThickness}" />
2023-02-05 23:26:45 +08:00
<Rectangle
Name="PART_RightGridLine"
Grid.Column="1"
Width="1"
VerticalAlignment="Stretch"
2023-02-08 02:00:06 +08:00
Fill="{DynamicResource DataGridLineBrush}" />
2023-02-05 23:26:45 +08:00
</Grid>
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:current /template/ Rectangle#CurrencyVisual">
<Setter Property="IsVisible" Value="True" />
</Style>
2023-02-08 02:00:06 +08:00
<Style Selector="^:focus /template/ Panel#FocusVisual">
2023-02-05 23:26:45 +08:00
<Setter Property="IsVisible" Value="True" />
</Style>
<Style Selector="^:invalid /template/ Rectangle#InvalidVisualElement">
<Setter Property="IsVisible" Value="True" />
</Style>
</ControlTheme>
<ControlTheme x:Key="{x:Type DataGridColumnHeader}" TargetType="DataGridColumnHeader">
2023-02-08 02:00:06 +08:00
<Setter Property="Foreground" Value="{DynamicResource DataGridColumnHeaderForeground}" />
<Setter Property="Background" Value="{DynamicResource DataGridColumnHeaderBackground}" />
2023-02-05 23:26:45 +08:00
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Focusable" Value="False" />
2023-02-08 02:00:06 +08:00
<Setter Property="SeparatorBrush" Value="{DynamicResource DataGridLineBrush}" />
<Setter Property="Padding" Value="{DynamicResource DataGridColumnHeaderPadding}" />
<Setter Property="MinHeight" Value="{DynamicResource DataGridColumnHeaderMinHeight}" />
2023-02-05 23:26:45 +08:00
<Setter Property="Template">
2023-02-08 02:00:06 +08:00
<ControlTemplate TargetType="DataGridColumnHeader">
2023-02-05 23:26:45 +08:00
<Border
x:Name="HeaderBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid Name="PART_ColumnHeaderRoot" ColumnDefinitions="*,Auto">
2023-02-08 11:43:30 +08:00
<Border
Name="HeaderBackground"
Grid.ColumnSpan="2"
Margin="4"
CornerRadius="3" />
2023-02-05 23:26:45 +08:00
<Grid
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
2023-02-08 11:43:30 +08:00
<ColumnDefinition Width="Auto" />
2023-02-05 23:26:45 +08:00
</Grid.ColumnDefinitions>
<ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
2023-02-08 02:00:06 +08:00
<PathIcon
2023-02-05 23:26:45 +08:00
Name="SortIcon"
Grid.Column="1"
2023-02-08 02:00:06 +08:00
Width="8"
Height="8"
2023-02-08 11:43:30 +08:00
Margin="0,0,8,0"
2023-02-08 02:00:06 +08:00
Foreground="{TemplateBinding Foreground}" />
2023-02-05 23:26:45 +08:00
</Grid>
<Rectangle
Name="VerticalSeparator"
Grid.Column="1"
Width="1"
VerticalAlignment="Stretch"
Fill="{TemplateBinding SeparatorBrush}"
IsVisible="{TemplateBinding AreSeparatorsVisible}" />
2023-02-08 02:00:06 +08:00
<Panel
2023-02-05 23:26:45 +08:00
x:Name="FocusVisual"
2023-02-08 02:00:06 +08:00
Grid.Column="0"
2023-02-05 23:26:45 +08:00
IsHitTestVisible="False"
IsVisible="False">
<Rectangle
2023-02-08 02:00:06 +08:00
Margin="{DynamicResource DataGridCellVisualBorderThickness}"
2023-02-05 23:26:45 +08:00
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Fill="Transparent"
IsHitTestVisible="False"
2023-02-08 02:00:06 +08:00
Stroke="{DynamicResource DataGridCellFocusBorderBrush}"
StrokeThickness="{DynamicResource DataGridCellVisualStrokeThickness}" />
</Panel>
2023-02-05 23:26:45 +08:00
</Grid>
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:focus-visible /template/ Grid#FocusVisual">
<Setter Property="IsVisible" Value="True" />
</Style>
2023-02-08 11:43:30 +08:00
<Style Selector="^:pointerover /template/ Border#HeaderBackground">
2023-02-08 02:00:06 +08:00
<Setter Property="Background" Value="{DynamicResource DataGridColumnHeaderPointeroverBackground}" />
2023-02-05 23:26:45 +08:00
</Style>
2023-02-08 11:43:30 +08:00
<Style Selector="^:pressed /template/ Border#HeaderBackground">
2023-02-08 02:00:06 +08:00
<Setter Property="Background" Value="{DynamicResource DataGridColumnHeaderPressedBackground}" />
2023-02-05 23:26:45 +08:00
</Style>
<Style Selector="^:dragIndicator">
<Setter Property="Opacity" Value="0.5" />
</Style>
2023-02-08 02:00:06 +08:00
<Style Selector="^:sortascending /template/ PathIcon#SortIcon">
2023-02-05 23:26:45 +08:00
<Setter Property="IsVisible" Value="True" />
2023-02-08 02:00:06 +08:00
<Setter Property="Data" Value="{DynamicResource DataGridColumnHeaderAscendingGlyph}" />
2023-02-05 23:26:45 +08:00
</Style>
2023-02-08 02:00:06 +08:00
<Style Selector="^:sortdescending /template/ PathIcon#SortIcon">
2023-02-05 23:26:45 +08:00
<Setter Property="IsVisible" Value="True" />
2023-02-08 02:00:06 +08:00
<Setter Property="Data" Value="{DynamicResource DataGridColumnHeaderDescendingGlyph}" />
2023-02-05 23:26:45 +08:00
</Style>
</ControlTheme>
<ControlTheme
x:Key="DataGridTopLeftColumnHeader"
BasedOn="{StaticResource {x:Type DataGridColumnHeader}}"
TargetType="DataGridColumnHeader">
<Setter Property="Template">
<ControlTemplate>
<Grid x:Name="TopLeftHeaderRoot" RowDefinitions="*,*,Auto">
<Border
Grid.RowSpan="2"
2023-02-08 02:00:06 +08:00
BorderBrush="{DynamicResource DataGridLineBrush}"
2023-02-05 23:26:45 +08:00
BorderThickness="0,0,1,0" />
<Rectangle
Grid.Row="0"
Grid.RowSpan="2"
Height="1"
VerticalAlignment="Bottom"
2023-02-08 02:00:06 +08:00
Fill="{DynamicResource DataGridLineBrush}"
2023-02-05 23:26:45 +08:00
StrokeThickness="1" />
</Grid>
</ControlTemplate>
</Setter>
</ControlTheme>
<ControlTheme x:Key="{x:Type DataGridRowHeader}" TargetType="DataGridRowHeader">
<Setter Property="Focusable" Value="False" />
2023-02-08 02:00:06 +08:00
<Setter Property="SeparatorBrush" Value="{DynamicResource DataGridLineBrush}" />
2023-02-05 23:26:45 +08:00
<Setter Property="AreSeparatorsVisible" Value="False" />
<Setter Property="Template">
<ControlTemplate>
<Grid
x:Name="PART_Root"
ColumnDefinitions="Auto,*"
RowDefinitions="*,*,Auto">
<Border
Grid.RowSpan="3"
Grid.ColumnSpan="2"
BorderBrush="{TemplateBinding SeparatorBrush}"
BorderThickness="0,0,1,0">
<Grid Background="{TemplateBinding Background}">
<Rectangle
x:Name="RowInvalidVisualElement"
2023-02-08 02:00:06 +08:00
Fill="{DynamicResource DataGridCellErrorBrush}"
2023-02-05 23:26:45 +08:00
Opacity="0"
Stretch="Fill" />
<Rectangle
x:Name="BackgroundRectangle"
2023-02-08 02:00:06 +08:00
Fill="{DynamicResource DataGridRowBackground}"
2023-02-05 23:26:45 +08:00
Stretch="Fill" />
</Grid>
</Border>
<Rectangle
x:Name="HorizontalSeparator"
Grid.Row="2"
2023-02-08 02:00:06 +08:00
Grid.Column="0"
2023-02-05 23:26:45 +08:00
Grid.ColumnSpan="2"
Height="1"
Margin="1,0,1,0"
HorizontalAlignment="Stretch"
Fill="{TemplateBinding SeparatorBrush}"
IsVisible="{TemplateBinding AreSeparatorsVisible}" />
<ContentPresenter
2023-02-08 02:00:06 +08:00
Grid.Row="0"
2023-02-05 23:26:45 +08:00
Grid.RowSpan="2"
Grid.Column="1"
2023-02-08 02:00:06 +08:00
Margin="{DynamicResource DataGridRowHeaderMargin}"
2023-02-05 23:26:45 +08:00
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="{TemplateBinding Content}" />
</Grid>
</ControlTemplate>
</Setter>
</ControlTheme>
<ControlTheme x:Key="{x:Type DataGridRow}" TargetType="DataGridRow">
<Setter Property="Focusable" Value="False" />
<Setter Property="Background" Value="{Binding $parent[DataGrid].RowBackground}" />
<Setter Property="Template">
2023-02-08 02:00:06 +08:00
<ControlTemplate TargetType="DataGridRow">
2023-02-05 23:26:45 +08:00
<Border
x:Name="RowBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<DataGridFrozenGrid
Name="PART_Root"
ColumnDefinitions="Auto,*"
RowDefinitions="*,Auto,Auto">
2023-02-08 11:43:30 +08:00
<Border
Name="BackgroundBorder"
2023-02-05 23:26:45 +08:00
Grid.RowSpan="2"
Grid.ColumnSpan="2"
2023-02-08 11:43:30 +08:00
Margin="2"
Background="{DynamicResource DataGridRowBackground}"
CornerRadius="3" />
2023-02-05 23:26:45 +08:00
<Rectangle
x:Name="InvalidVisualElement"
Grid.ColumnSpan="2"
2023-02-08 02:00:06 +08:00
Fill="{DynamicResource DataGridRowErrorBackground}"
2023-02-05 23:26:45 +08:00
Opacity="0" />
<DataGridRowHeader
Name="PART_RowHeader"
Grid.RowSpan="3"
DataGridFrozenGrid.IsFrozen="True" />
<DataGridCellsPresenter
Name="PART_CellsPresenter"
Grid.Column="1"
DataGridFrozenGrid.IsFrozen="True" />
<DataGridDetailsPresenter
Name="PART_DetailsPresenter"
Grid.Row="1"
Grid.Column="1"
2023-02-08 02:00:06 +08:00
Background="{DynamicResource DataGridDetailsPresenterBackground}" />
2023-02-05 23:26:45 +08:00
<Rectangle
Name="PART_BottomGridLine"
Grid.Row="2"
Grid.Column="1"
Height="1"
HorizontalAlignment="Stretch" />
</DataGridFrozenGrid>
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:invalid">
<Style Selector="^ /template/ Rectangle#InvalidVisualElement">
<Setter Property="Opacity" Value="0.4" />
</Style>
2023-02-08 11:43:30 +08:00
<Style Selector="^ /template/ Border#BackgroundBorder">
2023-02-05 23:26:45 +08:00
<Setter Property="Opacity" Value="0" />
</Style>
</Style>
2023-02-08 11:43:30 +08:00
<Style Selector="^:pointerover /template/ Border#BackgroundBorder">
<Setter Property="Background" Value="{DynamicResource DataGridRowPointeroverBackground}" />
2023-02-05 23:26:45 +08:00
</Style>
<Style Selector="^:selected">
2023-02-08 11:43:30 +08:00
<Style Selector="^ /template/ Border#BackgroundBorder">
<Setter Property="Background" Value="{DynamicResource DataGridRowSelectedBackground}" />
2023-02-05 23:26:45 +08:00
</Style>
2023-02-08 11:43:30 +08:00
<Style Selector="^:pointerover /template/ Border#BackgroundBorder">
<Setter Property="Background" Value="{DynamicResource DataGridRowSelectedPointeroverBackground}" />
2023-02-05 23:26:45 +08:00
</Style>
2023-02-08 11:43:30 +08:00
<Style Selector="^:focus /template/ Border#BackgroundBorder">
<Setter Property="Background" Value="{DynamicResource DataGridRowSelectedBackground}" />
2023-02-05 23:26:45 +08:00
</Style>
2023-02-08 11:43:30 +08:00
<Style Selector="^:pointerover:focus /template/ Border#BackgroundBorder">
<Setter Property="Background" Value="{DynamicResource DataGridRowSelectedPointeroverBackground}" />
2023-02-05 23:26:45 +08:00
</Style>
</Style>
</ControlTheme>
2023-02-08 02:00:06 +08:00
<ControlTheme x:Key="DataGridRowGroupExpanderButtonTheme" TargetType="ToggleButton">
<Setter Property="Cursor" Value="Hand" />
2023-02-05 23:26:45 +08:00
<Setter Property="Template">
2023-02-08 02:00:06 +08:00
<ControlTemplate TargetType="ToggleButton">
<PathIcon
2023-02-05 23:26:45 +08:00
Width="12"
Height="12"
HorizontalAlignment="Center"
VerticalAlignment="Center"
2023-02-08 02:00:06 +08:00
Background="Transparent"
Data="{DynamicResource DataGridRowGroupHeaderExpandIconGlyph}"
Foreground="{DynamicResource DataGridRowGroupHeaderExpandIconForeground}" />
2023-02-05 23:26:45 +08:00
</ControlTemplate>
</Setter>
2023-02-08 02:00:06 +08:00
<Style Selector="^:checked /template/ PathIcon">
<Setter Property="PathIcon.RenderTransform" Value="rotate(90deg)" />
2023-02-05 23:26:45 +08:00
</Style>
</ControlTheme>
<ControlTheme x:Key="{x:Type DataGridRowGroupHeader}" TargetType="DataGridRowGroupHeader">
<Setter Property="Focusable" Value="False" />
2023-02-08 02:00:06 +08:00
<Setter Property="Background" Value="{DynamicResource DataGridRowGroupHeaderBackground}" />
2023-02-05 23:26:45 +08:00
<Setter Property="MinHeight" Value="32" />
<Setter Property="Template">
2023-02-08 02:00:06 +08:00
<ControlTemplate x:DataType="collections:DataGridCollectionViewGroup" TargetType="DataGridRowGroupHeader">
2023-02-05 23:26:45 +08:00
<DataGridFrozenGrid
Name="PART_Root"
MinHeight="{TemplateBinding MinHeight}"
Background="{TemplateBinding Background}"
ColumnDefinitions="Auto,Auto,Auto,Auto,*"
RowDefinitions="*,Auto">
2023-02-08 02:00:06 +08:00
<Rectangle
Name="PART_IndentSpacer"
Grid.Row="0"
Grid.Column="1" />
2023-02-05 23:26:45 +08:00
<ToggleButton
Name="PART_ExpanderButton"
2023-02-08 02:00:06 +08:00
Grid.Row="0"
2023-02-05 23:26:45 +08:00
Grid.Column="2"
Margin="12,0,0,0"
Focusable="False"
2023-02-08 02:00:06 +08:00
Theme="{StaticResource DataGridRowGroupExpanderButtonTheme}" />
2023-02-05 23:26:45 +08:00
<StackPanel
2023-02-08 02:00:06 +08:00
Grid.Row="0"
2023-02-05 23:26:45 +08:00
Grid.Column="3"
Margin="12,0,0,0"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock
Name="PART_PropertyNameElement"
Margin="4,0,0,0"
Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding IsPropertyNameVisible}" />
<TextBlock
Margin="4,0,0,0"
Foreground="{TemplateBinding Foreground}"
Text="{Binding Key}" />
<TextBlock
Name="PART_ItemCountElement"
Margin="4,0,0,0"
Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding IsItemCountVisible}" />
</StackPanel>
<Rectangle
x:Name="CurrencyVisual"
2023-02-08 02:00:06 +08:00
Grid.Row="0"
Grid.Column="0"
2023-02-05 23:26:45 +08:00
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Fill="Transparent"
IsHitTestVisible="False"
IsVisible="False"
2023-02-08 02:00:06 +08:00
Stroke="{DynamicResource DataGridRowGroupHeaderCurrentBorderBrush}"
StrokeThickness="{DynamicResource DataGridRowGroupHeaderVisualStrokeThickness}" />
<Panel
2023-02-05 23:26:45 +08:00
x:Name="FocusVisual"
2023-02-08 02:00:06 +08:00
Grid.Row="0"
Grid.Column="0"
2023-02-05 23:26:45 +08:00
IsHitTestVisible="False"
IsVisible="False">
<Rectangle
2023-02-08 02:00:06 +08:00
Margin="{DynamicResource DataGridCellVisualBorderThickness}"
2023-02-05 23:26:45 +08:00
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Fill="Transparent"
IsHitTestVisible="False"
2023-02-08 02:00:06 +08:00
Stroke="{DynamicResource DataGridCellFocusBorderBrush}"
StrokeThickness="{DynamicResource DataGridCellVisualStrokeThickness}" />
</Panel>
2023-02-05 23:26:45 +08:00
<DataGridRowHeader
Name="PART_RowHeader"
2023-02-08 02:00:06 +08:00
Grid.Row="0"
2023-02-05 23:26:45 +08:00
Grid.RowSpan="2"
2023-02-08 02:00:06 +08:00
Grid.Column="0"
2023-02-05 23:26:45 +08:00
DataGridFrozenGrid.IsFrozen="True" />
<Rectangle
x:Name="PART_BottomGridLine"
Grid.Row="1"
2023-02-08 02:00:06 +08:00
Grid.Column="0"
2023-02-05 23:26:45 +08:00
Grid.ColumnSpan="5"
2023-02-08 02:00:06 +08:00
Height="1"
Fill="{DynamicResource DataGridLineBrush}" />
2023-02-05 23:26:45 +08:00
</DataGridFrozenGrid>
</ControlTemplate>
</Setter>
</ControlTheme>
<ControlTheme x:Key="{x:Type DataGrid}" TargetType="DataGrid">
<Setter Property="RowBackground" Value="Transparent" />
<Setter Property="HeadersVisibility" Value="Column" />
<Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="SelectionMode" Value="Extended" />
<Setter Property="GridLinesVisibility" Value="None" />
2023-02-08 02:00:06 +08:00
<Setter Property="HorizontalGridLinesBrush" Value="{DynamicResource DataGridLineBrush}" />
<Setter Property="VerticalGridLinesBrush" Value="{DynamicResource DataGridLineBrush}" />
2023-02-05 23:26:45 +08:00
<Setter Property="DropLocationIndicatorTemplate">
<Template>
<Rectangle Width="2" Fill="{DynamicResource DataGridDropLocationIndicatorBackground}" />
</Template>
</Setter>
<Setter Property="Template">
2023-02-08 02:00:06 +08:00
<ControlTemplate TargetType="DataGrid">
2023-02-05 23:26:45 +08:00
<Border
x:Name="DataGridBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid ColumnDefinitions="Auto,*,Auto" RowDefinitions="Auto,*,Auto,Auto">
2023-02-08 02:00:06 +08:00
<DataGridColumnHeader
Name="PART_TopLeftCornerHeader"
Grid.Row="0"
Grid.Column="0"
Theme="{StaticResource DataGridTopLeftColumnHeader}" />
2023-02-05 23:26:45 +08:00
<DataGridColumnHeadersPresenter
Name="PART_ColumnHeadersPresenter"
Grid.Row="0"
Grid.Column="1"
Grid.ColumnSpan="2" />
<Rectangle
Name="PART_ColumnHeadersAndRowsSeparator"
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="3"
Height="1"
VerticalAlignment="Bottom"
2023-02-08 02:00:06 +08:00
Fill="{DynamicResource DataGridLineBrush}" />
2023-02-05 23:26:45 +08:00
<DataGridRowsPresenter
Name="PART_RowsPresenter"
Grid.Row="1"
Grid.RowSpan="2"
Grid.Column="0"
Grid.ColumnSpan="3">
<DataGridRowsPresenter.GestureRecognizers>
<ScrollGestureRecognizer CanHorizontallyScroll="True" CanVerticallyScroll="True" />
</DataGridRowsPresenter.GestureRecognizers>
</DataGridRowsPresenter>
<Rectangle
Name="PART_BottomRightCorner"
Grid.Row="2"
Grid.Column="2"
Fill="{DynamicResource DataGridScrollBarsSeparatorBackground}" />
<ScrollBar
Name="PART_VerticalScrollbar"
Grid.Row="1"
Grid.Column="2"
Orientation="Vertical" />
<Grid
Grid.Row="2"
Grid.Column="1"
ColumnDefinitions="Auto,*">
<Rectangle Name="PART_FrozenColumnScrollBarSpacer" />
<ScrollBar
Name="PART_HorizontalScrollbar"
Grid.Column="1"
Height="{DynamicResource ScrollBarSize}"
Orientation="Horizontal" />
</Grid>
<Border
x:Name="PART_DisabledVisualElement"
Grid.Row="0"
Grid.RowSpan="4"
Grid.Column="0"
Grid.ColumnSpan="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
2023-02-08 02:00:06 +08:00
Background="{DynamicResource DataGridDisabledBackground}"
2023-02-05 23:26:45 +08:00
CornerRadius="2"
IsHitTestVisible="False"
IsVisible="{Binding !$parent[DataGrid].IsEnabled}" />
</Grid>
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:empty-columns">
<Style Selector="^ /template/ DataGridColumnHeader#PART_TopLeftCornerHeader">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="^ /template/ DataGridColumnHeadersPresenter#PART_ColumnHeadersPresenter">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="^ /template/ Rectangle#PART_ColumnHeadersAndRowsSeparator">
<Setter Property="IsVisible" Value="False" />
</Style>
</Style>
</ControlTheme>
2023-02-05 23:07:45 +08:00
</ResourceDictionary>