23 lines
2.0 KiB
XML
23 lines
2.0 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:HiiSheWpf="clr-namespace:HiiShe.WPFUI.Controls" >
|
|
<Style x:Key="{x:Type HiiSheWpf:HSButton}" TargetType="{x:Type HiiSheWpf:HSButton}">
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type HiiSheWpf:HSButton}">
|
|
<Border Name="border" BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="{TemplateBinding Control.BorderThickness}" SnapsToDevicePixels="True" Width="{TemplateBinding FrameworkElement.Width}" Height="{TemplateBinding FrameworkElement.Height}" Background="{TemplateBinding Control.Background}">
|
|
<ContentPresenter Name="contentPresenter" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="UIElement.IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Value="{Binding MyMoverBrush, RelativeSource={RelativeSource TemplatedParent}}" Property="Border.Background" />
|
|
</Trigger>
|
|
<Trigger Property="ButtonBase.IsPressed" Value="True">
|
|
<Setter TargetName="border" Value="{Binding MyEnterBrush, RelativeSource={RelativeSource TemplatedParent}}" Property="Border.Background" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ResourceDictionary> |