Files

145 lines
8.0 KiB
Plaintext
Raw Permalink Normal View History

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"
2026-02-20 15:31:44 +08:00
xmlns:decorations="clr-namespace:Melskin.Controls.Decorations">
2025-08-12 23:08:54 +08:00
2026-02-20 15:31:44 +08:00
<Style x:Key="EmbossChipStyle" TargetType="{x:Type controls:Chip}">
2025-08-12 23:08:54 +08:00
<Setter Property="Background" Value="{DynamicResource PrimaryVariantBrush}" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="Cursor" Value="Hand" />
2025-09-12 09:55:36 +08:00
<Setter Property="Foreground" Value="{DynamicResource TextAccentBrush}" />
<Setter Property="HeadBackground" Value="{DynamicResource PrimaryNormalBrush}" />
2025-09-12 09:55:36 +08:00
<Setter Property="HeadForeground" Value="{DynamicResource TextAccentBrush}" />
2025-12-23 21:35:54 +08:00
<Setter Property="VerticalContentAlignment" Value="Center" />
2025-08-12 23:08:54 +08:00
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Padding" Value="5,3" />
2025-08-26 21:33:20 +08:00
<Setter Property="FocusVisualStyle" Value="{DynamicResource FocusVisual}" />
2025-08-12 23:08:54 +08:00
<Setter Property="Template">
<Setter.Value>
2025-10-10 11:19:58 +08:00
<ControlTemplate TargetType="{x:Type controls:Chip}">
2025-09-04 22:39:00 +08:00
<decorations:EmbossBorder
2026-02-20 15:31:44 +08:00
x:Name="rootBorder"
2025-08-20 12:10:35 +08:00
Margin="-4"
Padding="0"
2026-02-20 15:31:44 +08:00
CornerRadius="3"
ToolTip="{TemplateBinding Url}">
2025-08-12 23:08:54 +08:00
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border
2026-02-20 15:31:44 +08:00
x:Name="headBorder"
Padding="{TemplateBinding Padding}"
2025-08-12 23:08:54 +08:00
Background="{TemplateBinding HeadBackground}"
CornerRadius="3,0,0,3"
TextBlock.FontWeight="Bold"
2026-02-20 15:31:44 +08:00
TextBlock.Foreground="{TemplateBinding HeadForeground}">
2025-08-12 23:08:54 +08:00
<ContentPresenter
2026-02-20 15:31:44 +08:00
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
2025-08-12 23:08:54 +08:00
ContentSource="Header"
Focusable="False"
RecognizesAccessKey="True"
2026-02-20 15:31:44 +08:00
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
2025-08-12 23:08:54 +08:00
</Border>
<Border
2026-02-20 15:31:44 +08:00
x:Name="contentBorder"
2026-01-02 17:30:30 +08:00
Grid.Column="1"
Padding="{TemplateBinding Padding}"
2026-02-20 15:31:44 +08:00
Background="{TemplateBinding Background}"
CornerRadius="0,3,3,0"
2025-12-23 21:35:54 +08:00
TextBlock.FontWeight="Bold"
2026-02-20 15:31:44 +08:00
TextBlock.Foreground="{TemplateBinding Foreground}">
2025-12-23 21:35:54 +08:00
<ContentPresenter
2026-02-20 15:31:44 +08:00
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
2025-12-23 21:35:54 +08:00
Focusable="False"
RecognizesAccessKey="True"
2026-02-20 15:31:44 +08:00
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
2025-12-23 21:35:54 +08:00
</Border>
</Grid>
</decorations:EmbossBorder>
<ControlTemplate.Triggers>
<Trigger Property="Url" Value="{x:Null}">
<Setter Property="Cursor" Value="Arrow" />
</Trigger>
<Trigger Property="Header" Value="{x:Null}">
2026-02-20 15:31:44 +08:00
<Setter TargetName="contentBorder" Property="CornerRadius" Value="3" />
<Setter TargetName="headBorder" Property="Padding" Value="0" />
2025-12-23 21:35:54 +08:00
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type controls:Chip}">
<Setter Property="Background" Value="{DynamicResource PrimaryVariantBrush}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Foreground" Value="{DynamicResource TextAccentBrush}" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HeadBackground" Value="{DynamicResource PrimaryNormalBrush}" />
<Setter Property="HeadForeground" Value="{DynamicResource TextAccentBrush}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Padding" Value="5,3" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource FocusVisual}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:Chip}">
<Border
2026-02-20 15:31:44 +08:00
x:Name="rootBorder"
2026-01-02 17:30:30 +08:00
Padding="0"
2026-02-20 15:31:44 +08:00
CornerRadius="3"
ToolTip="{TemplateBinding Url}">
2025-12-23 21:35:54 +08:00
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border
2026-02-20 15:31:44 +08:00
x:Name="headBorder"
Padding="{TemplateBinding Padding}"
2025-12-23 21:35:54 +08:00
Background="{TemplateBinding HeadBackground}"
CornerRadius="3,0,0,3"
TextBlock.FontWeight="Bold"
2026-02-20 15:31:44 +08:00
TextBlock.Foreground="{TemplateBinding HeadForeground}">
2025-12-23 21:35:54 +08:00
<ContentPresenter
2026-02-20 15:31:44 +08:00
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
2025-12-23 21:35:54 +08:00
ContentSource="Header"
Focusable="False"
RecognizesAccessKey="True"
2026-02-20 15:31:44 +08:00
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
2025-12-23 21:35:54 +08:00
</Border>
<Border
2026-02-20 15:31:44 +08:00
x:Name="contentBorder"
2026-01-02 17:30:30 +08:00
Grid.Column="1"
Padding="{TemplateBinding Padding}"
2026-02-20 15:31:44 +08:00
Background="{TemplateBinding Background}"
CornerRadius="0,3,3,0"
2025-08-12 23:08:54 +08:00
TextBlock.FontWeight="Bold"
2026-02-20 15:31:44 +08:00
TextBlock.Foreground="{TemplateBinding Foreground}">
2025-08-12 23:08:54 +08:00
<ContentPresenter
2026-02-20 15:31:44 +08:00
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
2025-08-12 23:08:54 +08:00
Focusable="False"
RecognizesAccessKey="True"
2026-02-20 15:31:44 +08:00
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
2025-08-12 23:08:54 +08:00
</Border>
</Grid>
2025-12-23 21:35:54 +08:00
</Border>
2025-08-12 23:08:54 +08:00
<ControlTemplate.Triggers>
<Trigger Property="Url" Value="{x:Null}">
<Setter Property="Cursor" Value="Arrow" />
</Trigger>
<Trigger Property="Header" Value="{x:Null}">
2026-02-20 15:31:44 +08:00
<Setter TargetName="contentBorder" Property="CornerRadius" Value="3" />
<Setter TargetName="headBorder" Property="Padding" Value="0" />
2025-08-12 23:08:54 +08:00
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>