更新
This commit is contained in:
@@ -1,17 +1,10 @@
|
||||
<!--
|
||||
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
|
||||
<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:controls="clr-namespace:WPFluent.Controls"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="DefaultUiBreadcrumbButtonStyle" TargetType="{x:Type ButtonBase}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource BreadcrumbBarNormalForegroundBrush}" />
|
||||
<Style TargetType="{x:Type ButtonBase}" x:Key="DefaultUiBreadcrumbButtonStyle">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
@@ -19,14 +12,14 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<ContentPresenter
|
||||
x:Name="Presenter"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
|
||||
x:Name="Presenter" />
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="Presenter" Property="TextElement.Foreground" Value="{DynamicResource BreadcrumbBarHoverForegroundBrush}" />
|
||||
<Setter Property="TextElement.Foreground" TargetName="Presenter" Value="{DynamicResource TextFillColorSecondaryBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False" />
|
||||
</ControlTemplate.Triggers>
|
||||
@@ -35,7 +28,7 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DefaultUiBreadcrumbBarItemStyle" TargetType="{x:Type controls:BreadcrumbBarItem}">
|
||||
<Style TargetType="{x:Type controls:BreadcrumbBarItem}" x:Key="DefaultUiBreadcrumbBarItemStyle">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="FontWeight" Value="DemiBold" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
@@ -66,10 +59,6 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button
|
||||
x:Name="Button"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Command="{Binding Path=TemplateButtonCommand, Mode=OneTime, RelativeSource={RelativeSource AncestorType={x:Type controls:BreadcrumbBar}}}"
|
||||
CommandParameter="{TemplateBinding Content}"
|
||||
Content="{TemplateBinding Content}"
|
||||
@@ -77,21 +66,25 @@
|
||||
ContentTemplateSelector="{Binding Path=ItemTemplateSelector, Mode=OneTime, RelativeSource={RelativeSource AncestorType={x:Type controls:BreadcrumbBar}}}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="{TemplateBinding FontWeight}"
|
||||
Style="{StaticResource DefaultUiBreadcrumbButtonStyle}" />
|
||||
Grid.Column="0"
|
||||
Style="{StaticResource DefaultUiBreadcrumbButtonStyle}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
x:Name="Button" />
|
||||
|
||||
<ContentControl
|
||||
x:Name="Icon"
|
||||
Content="{TemplateBinding Icon}"
|
||||
Focusable="False"
|
||||
Grid.Column="1"
|
||||
Margin="{TemplateBinding IconMargin}"
|
||||
Content="{TemplateBinding Icon}"
|
||||
Focusable="False" />
|
||||
x:Name="Icon" />
|
||||
</Grid>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsLast" Value="True">
|
||||
<Setter TargetName="Button" Property="Foreground" Value="{DynamicResource BreadcrumbBarCurrentNormalForegroundBrush}" />
|
||||
<Setter TargetName="Button" Property="IsEnabled" Value="False" />
|
||||
<Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
|
||||
<Setter Property="Foreground" TargetName="Button" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
<Setter Property="IsEnabled" TargetName="Button" Value="False" />
|
||||
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -99,7 +92,7 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DefaultUiBreadcrumbBarStyle" TargetType="{x:Type controls:BreadcrumbBar}">
|
||||
<Style TargetType="{x:Type controls:BreadcrumbBar}" x:Key="DefaultUiBreadcrumbBarStyle">
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
|
||||
Reference in New Issue
Block a user