Files
Shrlalgo.RvKits/Melskin/Controls/Hyperlink.xaml

52 lines
2.8 KiB
Plaintext
Raw Normal View History

2025-08-12 23:08:54 +08:00
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2026-02-12 21:29:00 +08:00
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2026-01-02 17:30:41 +08:00
xmlns:assists="clr-namespace:Melskin.Assists"
2026-02-12 21:29:00 +08:00
xmlns:controls="clr-namespace:Melskin.Controls">
2025-08-12 23:08:54 +08:00
<Style TargetType="{x:Type controls:Hyperlink}">
<Setter Property="Background" Value="{x:Null}" />
2025-10-10 11:19:58 +08:00
<Setter Property="Cursor" Value="Hand" />
2025-12-23 21:35:54 +08:00
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
2025-08-12 23:08:54 +08:00
<Setter Property="VerticalContentAlignment" Value="Center" />
2025-10-10 11:19:58 +08:00
<Setter Property="Foreground" Value="{DynamicResource TextLinkBrush}" />
2025-08-12 23:08:54 +08:00
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:Hyperlink}">
<Grid Background="{TemplateBinding Background}">
2025-12-23 21:35:54 +08:00
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<controls:IconElement
2026-02-12 21:29:00 +08:00
x:Name="Icon"
2025-08-12 23:08:54 +08:00
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
2026-02-12 21:29:00 +08:00
Foreground="{TemplateBinding Foreground}"
Symbol="Link" />
2025-12-23 21:35:54 +08:00
<ContentPresenter
2026-02-12 21:29:00 +08:00
x:Name="Content"
2025-12-23 21:35:54 +08:00
Grid.Column="1"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
2026-01-02 17:30:30 +08:00
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
2026-02-12 21:29:00 +08:00
TextBlock.Foreground="{TemplateBinding Foreground}" />
2025-08-12 23:08:54 +08:00
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
2026-02-12 21:29:00 +08:00
<Setter Property="Foreground" Value="{DynamicResource PrimaryHoverBrush}" />
2025-08-12 23:08:54 +08:00
</Trigger>
<Trigger Property="IsPressed" Value="True">
2026-02-12 21:29:00 +08:00
<Setter Property="Foreground" Value="{DynamicResource PrimaryPressedBrush}" />
2025-12-23 21:35:54 +08:00
</Trigger>
<Trigger Property="IsVisited" Value="True">
2026-02-12 21:29:00 +08:00
<Setter Property="Foreground" Value="RoyalBlue" />
2025-08-12 23:08:54 +08:00
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>