|
|
|
@ -81,15 +81,11 @@ |
|
|
|
SharedSizeGroup="MenuItemChevron" /> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
<Viewbox Name="PART_IconPresenter" |
|
|
|
Margin="{DynamicResource MenuIconPresenterMargin}" |
|
|
|
StretchDirection="DownOnly" |
|
|
|
HorizontalAlignment="Center" |
|
|
|
VerticalAlignment="Center" |
|
|
|
IsVisible="False" |
|
|
|
Width="16" Height="16"> |
|
|
|
<ContentPresenter Content="{TemplateBinding Icon}"/> |
|
|
|
</Viewbox> |
|
|
|
<ContentControl x:Name="PART_IconPresenter" |
|
|
|
Theme="{StaticResource FluentMenuItemIconTheme}" |
|
|
|
Content="{TemplateBinding Icon}" |
|
|
|
IsVisible="False" |
|
|
|
Margin="{DynamicResource MenuIconPresenterMargin}" /> |
|
|
|
|
|
|
|
<ContentPresenter Name="PART_HeaderPresenter" |
|
|
|
Content="{TemplateBinding Header}" |
|
|
|
@ -143,7 +139,7 @@ |
|
|
|
</ControlTemplate> |
|
|
|
</Setter> |
|
|
|
|
|
|
|
<Style Selector="^:icon /template/ Viewbox#PART_IconPresenter"> |
|
|
|
<Style Selector="^:icon /template/ ContentControl#PART_IconPresenter"> |
|
|
|
<Setter Property="IsVisible" Value="True" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="^:selected"> |
|
|
|
@ -210,4 +206,21 @@ |
|
|
|
<Setter Property="Padding" Value="{DynamicResource HorizontalMenuFlyoutItemThemePaddingNarrow}" /> |
|
|
|
<Setter Property="Margin" Value="{DynamicResource HorizontalMenuFlyoutItemMargin}" /> |
|
|
|
</ControlTheme> |
|
|
|
<ControlTheme x:Key="FluentMenuItemIconTheme" |
|
|
|
TargetType="ContentControl"> |
|
|
|
<Setter Property="Width" |
|
|
|
Value="16" /> |
|
|
|
<Setter Property="Height" |
|
|
|
Value="16" /> |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
<Viewbox |
|
|
|
StretchDirection="DownOnly" |
|
|
|
HorizontalAlignment="Center" |
|
|
|
VerticalAlignment="Center"> |
|
|
|
<ContentPresenter x:Name="PART_ContentPresenter" Content="{TemplateBinding Content}" /> |
|
|
|
</Viewbox> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter> |
|
|
|
</ControlTheme> |
|
|
|
</ResourceDictionary> |
|
|
|
|