mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-12 20:49:26 +08:00
fix: simplify Expander icon.
This commit is contained in:
@@ -44,9 +44,17 @@
|
||||
Grid.Column="0"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}" />
|
||||
<ContentPresenter
|
||||
Name="PART_IconContentPresenter" Grid.Column="1"
|
||||
Margin="{DynamicResource ExpanderEndIconMargin}" />
|
||||
<PathIcon
|
||||
Name="PART_PathIcon" Grid.Column="1"
|
||||
Width="{DynamicResource ExpanderIconSize}"
|
||||
Height="{DynamicResource ExpanderIconSize}"
|
||||
Data="M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z">
|
||||
<PathIcon.Transitions>
|
||||
<Transitions>
|
||||
<TransformOperationsTransition Property="RenderTransform" Duration="0.1" />
|
||||
</Transitions>
|
||||
</PathIcon.Transitions>
|
||||
</PathIcon>
|
||||
</Grid>
|
||||
</ToggleButton>
|
||||
</LayoutTransformControl>
|
||||
@@ -71,32 +79,8 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:expanded /template/ ContentPresenter#PART_IconContentPresenter">
|
||||
<Setter Property="ContentPresenter.Content">
|
||||
<Template>
|
||||
<PathIcon
|
||||
Width="{DynamicResource ExpanderIconSize}"
|
||||
Height="{DynamicResource ExpanderIconSize}"
|
||||
Data="M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z" />
|
||||
</Template>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:not(:expanded) /template/ ContentPresenter#PART_IconContentPresenter">
|
||||
<Setter Property="ContentPresenter.Content">
|
||||
<Template>
|
||||
<PathIcon
|
||||
Width="{DynamicResource ExpanderIconSize}"
|
||||
Height="{DynamicResource ExpanderIconSize}"
|
||||
Data="M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z">
|
||||
<PathIcon.RenderTransform>
|
||||
<TransformGroup>
|
||||
<RotateTransform Angle="180" CenterX="0.6" CenterY="0.6" />
|
||||
</TransformGroup>
|
||||
</PathIcon.RenderTransform>
|
||||
</PathIcon>
|
||||
</Template>
|
||||
</Setter>
|
||||
<Style Selector="^:expanded /template/ PathIcon#PART_PathIcon">
|
||||
<Setter Property="PathIcon.RenderTransform" Value="rotate(180deg)" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:right">
|
||||
|
||||
Reference in New Issue
Block a user