| |
16.88.3.Multi Trigger: Pressed, Mouse over |
|
<StackPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel.Resources>
<Style x:Key="normal">
<Setter Property="Control.FontSize" Value="24" />
<Setter Property="Control.HorizontalAlignment" Value="Center" />
<Setter Property="Control.Margin" Value="24" />
<Style.Triggers>
<Trigger Property="Button.IsPressed" Value="True">
<Setter Property="Control.Foreground" Value="Red" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Control.IsMouseOver" Value="True" />
<Condition Property="Button.IsPressed" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="Control.FontStyle" Value="Italic" />
<Setter Property="Control.Foreground" Value="Blue" />
</MultiTrigger>
</Style.Triggers>
</Style>
</StackPanel.Resources>
<Button Style="{StaticResource normal}">
Button Number 1
</Button>
</StackPanel>
|
|
|
|