feat: add ShowIcon property.

This commit is contained in:
Zhang Dian
2024-09-11 19:32:13 +08:00
parent c1e58d5e71
commit 621f55674c
12 changed files with 72 additions and 43 deletions

View File

@@ -92,7 +92,7 @@
Height="{DynamicResource NotificationCardIconHeight}"
Margin="{DynamicResource NotificationCardIconMargin}"
VerticalAlignment="Top"
IsVisible="False"
IsVisible="{TemplateBinding ShowIcon}"
Data="{DynamicResource NotificationCardInformationIconPathData}" />
<ContentControl
x:Name="PART_Content"
@@ -366,22 +366,18 @@
</Style>
<Style Selector="^:information /template/ PathIcon#NotificationIcon">
<Setter Property="IsVisible" Value="True" />
<Setter Property="Foreground" Value="{DynamicResource NotificationCardInformationIconForeground}" />
<Setter Property="Data" Value="{DynamicResource NotificationCardInformationIconPathData}" />
</Style>
<Style Selector="^:success /template/ PathIcon#NotificationIcon">
<Setter Property="IsVisible" Value="True" />
<Setter Property="Foreground" Value="{DynamicResource NotificationCardSuccessIconForeground}" />
<Setter Property="Data" Value="{DynamicResource NotificationCardSuccessIconPathData}" />
</Style>
<Style Selector="^:warning /template/ PathIcon#NotificationIcon">
<Setter Property="IsVisible" Value="True" />
<Setter Property="Foreground" Value="{DynamicResource NotificationCardWarningIconForeground}" />
<Setter Property="Data" Value="{DynamicResource NotificationCardWarningIconPathData}" />
</Style>
<Style Selector="^:error /template/ PathIcon#NotificationIcon">
<Setter Property="IsVisible" Value="True" />
<Setter Property="Foreground" Value="{DynamicResource NotificationCardErrorIconForeground}" />
<Setter Property="Data" Value="{DynamicResource NotificationCardErrorIconPathData}" />
</Style>