feat: replace shared resources.

This commit is contained in:
Zhang Dian
2025-03-18 10:24:40 +08:00
parent d0b9f2d7c9
commit 626dff4e69
2 changed files with 12 additions and 8 deletions

View File

@@ -1,6 +1,10 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StaticResource x:Key="TreeDataGridSortIconAscendingPath" ResourceKey="SemiIconSmallTriangleTop"/>
<StaticResource x:Key="TreeDataGridSortIconDescendingPath" ResourceKey="SemiIconSmallTriangleDown"/>
<StaticResource x:Key="TreeDataGridItemCollapsedChevronPathData" ResourceKey="SemiIconTreeTriangleRight"/>
<Thickness x:Key="TreeDataGridRowMargin">2</Thickness>
<StaticResource x:Key="TreeDataGridSortIconAscendingPath" ResourceKey="SemiIconSmallTriangleTop" />
<StaticResource x:Key="TreeDataGridSortIconDescendingPath" ResourceKey="SemiIconSmallTriangleDown" />
<StaticResource x:Key="TreeDataGridItemCollapsedChevronPathData" ResourceKey="SemiIconTreeTriangleRight" />
<StaticResource x:Key="TreeDataGridColumnHeaderCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
<StaticResource x:Key="TreeDataGridColumnHeaderMinHeight" ResourceKey="SemiHeightControlDefault" />
<StaticResource x:Key="TreeDataGridRowCornerRadius" ResourceKey="SemiBorderRadiusSmall" />
<StaticResource x:Key="TreeDataGridRowMinHeight" ResourceKey="SemiHeightControlDefault" />
<StaticResource x:Key="TreeDataGridRowMargin" ResourceKey="SemiThicknessSuperTight" />
</ResourceDictionary>

View File

@@ -49,10 +49,10 @@
<ControlTheme x:Key="{x:Type TreeDataGridColumnHeader}" TargetType="TreeDataGridColumnHeader">
<Setter Property="Background" Value="Transparent" />
<Setter Property="MinHeight" Value="32" />
<Setter Property="MinHeight" Value="{DynamicResource TreeDataGridColumnHeaderMinHeight}" />
<Setter Property="Padding" Value="8 2 0 2" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="CornerRadius" Value="4" />
<Setter Property="CornerRadius" Value="{DynamicResource TreeDataGridColumnHeaderCornerRadius}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Foreground" Value="{DynamicResource TreeDataGridColumnHeaderForeground}" />
<Setter Property="Template">
@@ -137,8 +137,8 @@
<ControlTheme x:Key="{x:Type TreeDataGridRow}" TargetType="TreeDataGridRow">
<Setter Property="Background" Value="Transparent" />
<Setter Property="CornerRadius" Value="3" />
<Setter Property="MinHeight" Value="32" />
<Setter Property="CornerRadius" Value="{DynamicResource TreeDataGridRowCornerRadius}" />
<Setter Property="MinHeight" Value="{DynamicResource TreeDataGridRowMinHeight}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<ControlTemplate>