48 lines
3.0 KiB
XML
48 lines
3.0 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:controls="clr-namespace:AntdWpf.Controls"
|
|
xmlns:helpers="clr-namespace:AntdWpf.Helpers">
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/Converters.xaml" />
|
|
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/Control.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
<Style BasedOn="{StaticResource Ant.TextElement}" TargetType="{x:Type controls:Hyperlink}">
|
|
<Setter Property="Background" Value="{x:Null}" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Foreground" Value="{DynamicResource LinkBrush}" />
|
|
<Setter Property="helpers:AntdControl.MouseOverForeground"
|
|
Value="{Binding Foreground, Mode=OneWay, ConverterParameter=5,
|
|
RelativeSource={RelativeSource Self}, Converter={StaticResource ColorPaletteConverter}}" />
|
|
<Setter Property="helpers:AntdControl.PressedForeground"
|
|
Value="{Binding Foreground, Mode=OneWay, ConverterParameter=7,
|
|
RelativeSource={RelativeSource Self}, Converter={StaticResource ColorPaletteConverter}}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type controls:Hyperlink}">
|
|
<Grid Background="{TemplateBinding Background}">
|
|
<ContentPresenter x:Name="Content"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Content"
|
|
Property="TextElement.Foreground"
|
|
Value="{Binding Path=(helpers:AntdControl.MouseOverForeground), Mode=OneWay,
|
|
RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="Content"
|
|
Property="TextElement.Foreground"
|
|
Value="{Binding Path=(helpers:AntdControl.PressedForeground), Mode=OneWay,
|
|
RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary> |