mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-03 00:00:55 +08:00
feat: replace TreeDataGrid icon.
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StreamGeometry x:Key="TreeDataGridSortIconAscendingPath">m6.45 8.34 4.8-5.48a1 1 0 0 1 1.5 0l4.8 5.48A1 1 0 0 1 16.8 10H7.2a1 1 0 0 1-.75-1.66Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="TreeDataGridSortIconDescendingPath">m17.55 15.66-4.8 5.48a1 1 0 0 1-1.5 0l-4.8-5.48A1 1 0 0 1 7.2 14h9.6a1 1 0 0 1 .75 1.66Z</StreamGeometry>
|
||||
<StreamGeometry x:Key="TreeDataGridItemCollapsedChevronPathData">m9.66 3.44 8.97 7.8a1 1 0 0 1 0 1.51l-8.97 7.81A1 1 0 0 1 8 19.81V4.19a1 1 0 0 1 1.66-.75Z</StreamGeometry>
|
||||
<!-- <StaticResource x:Key="TreeDataGridSortIconAscendingPath" ResourceKey="SemiIconCaretUp"/> -->
|
||||
<!-- <StaticResource x:Key="TreeDataGridSortIconDescendingPath" ResourceKey="SemiIconCaretDown"/> -->
|
||||
<!-- <StaticResource x:Key="TreeDataGridItemCollapsedChevronPathData" ResourceKey="SemiIconTreeTriangleRight"/> -->
|
||||
<StaticResource x:Key="TreeDataGridSortIconAscendingPath" ResourceKey="SemiIconSmallTriangleTop"/>
|
||||
<StaticResource x:Key="TreeDataGridSortIconDescendingPath" ResourceKey="SemiIconSmallTriangleDown"/>
|
||||
<StaticResource x:Key="TreeDataGridItemCollapsedChevronPathData" ResourceKey="SemiIconTreeTriangleRight"/>
|
||||
<Thickness x:Key="TreeDataGridRowMargin">2</Thickness>
|
||||
</ResourceDictionary>
|
||||
@@ -87,11 +87,8 @@
|
||||
</Panel>
|
||||
<PathIcon
|
||||
Name="SortIcon"
|
||||
Width="8"
|
||||
Height="8"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Margin="0,0,8,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Right"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
TabIndex="1" />
|
||||
@@ -192,25 +189,17 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="TreeDataGridExpandCollapseChevron" TargetType="ToggleButton">
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Width" Value="8" />
|
||||
<Setter Property="Height" Value="8" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TreeDataGridColumnHeaderForeground}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Border
|
||||
<PathIcon
|
||||
Name="ChevronPath"
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent">
|
||||
<PathIcon
|
||||
Name="ChevronPath"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="{DynamicResource TreeDataGridItemCollapsedChevronPathData}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</Border>
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="Small"
|
||||
Data="{DynamicResource TreeDataGridItemCollapsedChevronPathData}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:checked /template/ PathIcon#ChevronPath">
|
||||
@@ -223,18 +212,15 @@
|
||||
<ControlTemplate>
|
||||
<Border
|
||||
Name="CellBorder"
|
||||
Padding="{TemplateBinding Indent,
|
||||
Converter={x:Static conv:IndentConverter.Instance}}"
|
||||
Padding="{TemplateBinding Indent,Converter={x:Static conv:IndentConverter.Instance}}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<DockPanel>
|
||||
<Border
|
||||
Width="12"
|
||||
Height="12"
|
||||
Margin="4,0"
|
||||
DockPanel.Dock="Left">
|
||||
DockPanel.Dock="Left"
|
||||
Margin="4,0">
|
||||
<ToggleButton
|
||||
Focusable="False"
|
||||
IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}"
|
||||
@@ -335,4 +321,4 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user