61 lines
2.9 KiB
Plaintext
61 lines
2.9 KiB
Plaintext
|
|
<!--
|
||
|
|
This Source Code Form is subject to the terms of the MIT License.
|
||
|
|
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
|
||
|
|
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
|
||
|
|
All Rights Reserved.
|
||
|
|
-->
|
||
|
|
|
||
|
|
<ResourceDictionary
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:controls="clr-namespace:WPFluent.Controls"
|
||
|
|
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||
|
|
|
||
|
|
<Style TargetType="{x:Type controls:NavigationViewItemHeader}">
|
||
|
|
<Setter Property="Foreground" Value="{DynamicResource NavigationViewItemForeground}" />
|
||
|
|
<Setter Property="Background" Value="Transparent" />
|
||
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||
|
|
<Setter Property="Margin" Value="0,12,0,0" />
|
||
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||
|
|
<Setter Property="Template">
|
||
|
|
<Setter.Value>
|
||
|
|
<ControlTemplate TargetType="{x:Type controls:NavigationViewItemHeader}">
|
||
|
|
<Grid
|
||
|
|
Margin="{TemplateBinding Margin}"
|
||
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}">
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
|
||
|
|
<ContentPresenter
|
||
|
|
x:Name="IconElement"
|
||
|
|
Grid.Column="0"
|
||
|
|
Margin="0,0,4,0"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
Content="{TemplateBinding Icon}"
|
||
|
|
TextElement.FontSize="{TemplateBinding FontSize}"
|
||
|
|
TextElement.Foreground="{TemplateBinding Foreground}" />
|
||
|
|
|
||
|
|
<TextBlock
|
||
|
|
Grid.Column="1"
|
||
|
|
FontSize="{TemplateBinding FontSize}"
|
||
|
|
Foreground="{TemplateBinding Foreground}"
|
||
|
|
Text="{TemplateBinding Text}" />
|
||
|
|
</Grid>
|
||
|
|
<ControlTemplate.Triggers>
|
||
|
|
<Trigger Property="Icon" Value="{x:Null}">
|
||
|
|
<Setter TargetName="IconElement" Property="Margin" Value="0" />
|
||
|
|
<Setter TargetName="IconElement" Property="Visibility" Value="Collapsed" />
|
||
|
|
</Trigger>
|
||
|
|
</ControlTemplate.Triggers>
|
||
|
|
</ControlTemplate>
|
||
|
|
</Setter.Value>
|
||
|
|
</Setter>
|
||
|
|
</Style>
|
||
|
|
|
||
|
|
</ResourceDictionary>
|