feat: add active class to path icon.

This commit is contained in:
rabbitism
2024-01-27 03:08:20 +08:00
parent 53b468db4a
commit 1a2628eff0
4 changed files with 42 additions and 0 deletions

View File

@@ -11,6 +11,7 @@
<Border Background="{TemplateBinding Background}">
<Viewbox Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
<Path
Name="PART_Path"
Data="{TemplateBinding Data}"
Fill="{TemplateBinding Foreground}"
Stretch="Uniform" />
@@ -18,5 +19,8 @@
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^.Active /template/ Path#PART_Path">
<Setter Property="Fill" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderBrush}"></Setter>
</Style>
</ControlTheme>
</ResourceDictionary>