2025-08-12 23:08:54 +08:00
|
|
|
<ResourceDictionary
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2026-02-20 15:31:44 +08:00
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2026-01-02 17:30:41 +08:00
|
|
|
xmlns:controls="clr-namespace:Melskin.Controls"
|
|
|
|
|
xmlns:converters="clr-namespace:Melskin.Converters"
|
2026-02-20 15:31:44 +08:00
|
|
|
xmlns:internal="clr-namespace:Melskin.Converters.Internal">
|
2025-08-12 23:08:54 +08:00
|
|
|
|
2026-02-20 15:31:44 +08:00
|
|
|
<Style x:Key="BreadcrumbItemStyle" TargetType="{x:Type controls:BreadcrumbItem}">
|
2025-08-26 21:33:20 +08:00
|
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource FocusVisual}" />
|
2025-08-12 23:08:54 +08:00
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
|
|
|
<Setter Property="Padding" Value="0" />
|
|
|
|
|
<Setter Property="Margin" Value="4" />
|
|
|
|
|
<Setter Property="Separator" Value="{Binding Separator, RelativeSource={RelativeSource AncestorType=controls:Breadcrumb}}" />
|
|
|
|
|
<Setter Property="SeparatorBrush" Value="{Binding SeparatorBrush, RelativeSource={RelativeSource AncestorType=controls:Breadcrumb}}" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type controls:BreadcrumbItem}">
|
|
|
|
|
<Border
|
2026-02-20 15:31:44 +08:00
|
|
|
x:Name="Bd"
|
2025-08-12 23:08:54 +08:00
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
2026-02-20 15:31:44 +08:00
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
2025-08-12 23:08:54 +08:00
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
<ContentPresenter
|
2026-02-20 15:31:44 +08:00
|
|
|
x:Name="content"
|
2026-01-02 17:30:30 +08:00
|
|
|
Margin="{TemplateBinding Padding}"
|
2026-02-20 15:31:44 +08:00
|
|
|
Cursor="Hand"
|
|
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
2025-08-12 23:08:54 +08:00
|
|
|
|
|
|
|
|
<TextBlock
|
2026-02-20 15:31:44 +08:00
|
|
|
x:Name="separator"
|
2026-01-02 17:30:30 +08:00
|
|
|
Margin="{TemplateBinding Padding}"
|
2026-02-20 15:31:44 +08:00
|
|
|
Foreground="{TemplateBinding SeparatorBrush}"
|
2025-08-12 23:08:54 +08:00
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
|
|
|
Text="{TemplateBinding Separator}"
|
2026-02-20 15:31:44 +08:00
|
|
|
Visibility="Collapsed" />
|
2025-08-12 23:08:54 +08:00
|
|
|
|
|
|
|
|
<Rectangle
|
2026-02-20 15:31:44 +08:00
|
|
|
x:Name="separatorIcon"
|
|
|
|
|
Width="20"
|
2025-08-12 23:08:54 +08:00
|
|
|
Height="2"
|
|
|
|
|
Margin="{TemplateBinding Padding}"
|
|
|
|
|
VerticalAlignment="Center"
|
2026-02-20 15:31:44 +08:00
|
|
|
Fill="{TemplateBinding SeparatorBrush}"
|
|
|
|
|
RenderTransformOrigin="0.5,0.5">
|
2025-08-12 23:08:54 +08:00
|
|
|
<Rectangle.RenderTransform>
|
|
|
|
|
<RotateTransform Angle="105" />
|
|
|
|
|
</Rectangle.RenderTransform>
|
|
|
|
|
</Rectangle>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Border>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryFocusedBrush}" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
|
|
|
|
|
</Trigger>
|
2025-08-20 12:10:13 +08:00
|
|
|
<DataTrigger Binding="{Binding Href, Converter={x:Static converters:NullOrEmptyConverter.Instance}, RelativeSource={RelativeSource Mode=Self}}" Value="True">
|
2025-08-12 23:08:54 +08:00
|
|
|
<Setter Property="IsEnabled" Value="False" />
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
|
|
|
|
<DataTrigger Value="True">
|
|
|
|
|
<DataTrigger.Binding>
|
2025-08-20 12:10:35 +08:00
|
|
|
<MultiBinding Converter="{x:Static internal:IsLastItemConverter.Instance}">
|
2025-08-12 23:08:54 +08:00
|
|
|
<Binding RelativeSource="{RelativeSource AncestorType=controls:Breadcrumb}" />
|
|
|
|
|
<Binding RelativeSource="{RelativeSource Mode=Self}" />
|
|
|
|
|
</MultiBinding>
|
|
|
|
|
</DataTrigger.Binding>
|
2026-02-20 15:31:44 +08:00
|
|
|
<Setter TargetName="separator" Property="Visibility" Value="Collapsed" />
|
|
|
|
|
<Setter TargetName="separatorIcon" Property="Visibility" Value="Collapsed" />
|
2025-08-12 23:08:54 +08:00
|
|
|
</DataTrigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type controls:Breadcrumb}">
|
|
|
|
|
<Setter Property="Background" Value="Transparent" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderNormalBrush}" />
|
|
|
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
|
|
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
2025-10-10 11:19:58 +08:00
|
|
|
<Setter Property="ItemContainerStyle" Value="{StaticResource BreadcrumbItemStyle}" />
|
2025-08-12 23:08:54 +08:00
|
|
|
<Setter Property="Margin" Value="0" />
|
|
|
|
|
<Setter Property="Padding" Value="3" />
|
|
|
|
|
<Setter Property="Separator" Value="/" />
|
2025-08-25 17:30:53 +08:00
|
|
|
<Setter Property="SeparatorBrush" Value="{DynamicResource DividerBrush}" />
|
2025-08-12 23:08:54 +08:00
|
|
|
<Setter Property="ItemsPanel">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
|
<StackPanel Orientation="Horizontal" />
|
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type controls:Breadcrumb}">
|
|
|
|
|
<Border
|
2026-02-20 15:31:44 +08:00
|
|
|
x:Name="Bd"
|
2025-08-12 23:08:54 +08:00
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
2026-02-20 15:31:44 +08:00
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
2025-08-12 23:08:54 +08:00
|
|
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
|
|
|
</Border>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsEnabled" Value="False">
|
2026-02-20 15:31:44 +08:00
|
|
|
<Setter TargetName="Bd" Property="Opacity" Value="0.5" />
|
2025-08-12 23:08:54 +08:00
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
</ResourceDictionary>
|