Vivekanand SK

Vivekanand SK

  • NA
  • 178
  • 751

Designed a Toggle Button, Need some help in Trigger sections

Jun 4 2016 10:01 AM
Please find the code below,
 
<Window x:Class="ToggleButton.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
Title="MainWindow"
Width="525"
Height="350">
<Window.Resources>
<Storyboard x:Key="NormalCheckedStoryboard">
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalBorderON"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalOrHoverShapeOn"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledShapeOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockOn"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockDisabled"
Storyboard.TargetProperty="Opacity"
To="0" />
</Storyboard>
<Storyboard x:Key="HoverCheckedStoryboard">
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverBorderON"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalOrHoverShapeOn"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledShapeOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockOn"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockDisabled"
Storyboard.TargetProperty="Opacity"
To="0" />
</Storyboard>
<Storyboard x:Key="DisabledCheckedStoryboard">
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledBorderON"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalOrHoverShapeOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledShapeOn"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockDisabled"
Storyboard.TargetProperty="Opacity"
To="1" />
</Storyboard>
<Storyboard x:Key="NormalUncheckedStoryboard">
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalBorderOff"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalOrHoverShapeOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledShapeOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalShapeOff"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockOff"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockDisabled"
Storyboard.TargetProperty="Opacity"
To="0" />
</Storyboard>
<Storyboard x:Key="HoverUncheckedStoryboard">
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverBorderOff"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalOrHoverShapeOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledShapeOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverShapeOff"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockOff"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockDisabled"
Storyboard.TargetProperty="Opacity"
To="0" />
</Storyboard>
<Storyboard x:Key="DisabledUncheckedStoryboard">
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledBorderON"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverBorderOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledBorderOff"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalOrHoverShapeOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledShapeOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="NormalShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="HoverShapeOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="DisabledShapeOff"
Storyboard.TargetProperty="Opacity"
To="1" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockOn"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockOff"
Storyboard.TargetProperty="Opacity"
To="0" />
<DoubleAnimation Duration="0:0:0.3"
Storyboard.TargetName="TextBlockDisabled"
Storyboard.TargetProperty="Opacity"
To="1" />
</Storyboard>
<Style x:Key="ToggleButtonStyle" TargetType="ToggleButton">
<Setter Property="Background" Value="#00b9e5" />
<Setter Property="Foreground" Value="#333333" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Width" Value="120" />
<Setter Property="Height" Value="20" />
<Setter Property="FontSize" Value="15" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Grid SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border x:Name="NormalBorderON"
Grid.ColumnSpan="3"
Width="44"
Height="{TemplateBinding Height}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding Background}"
BorderThickness="2"
CornerRadius="10" />
<Border x:Name="HoverBorderON"
Grid.ColumnSpan="3"
Width="44"
Height="{TemplateBinding Height}"
Background="#62e3ff"
BorderBrush="#62e3ff"
BorderThickness="2"
CornerRadius="10" />
<Border x:Name="DisabledBorderON"
Grid.ColumnSpan="3"
Width="44"
Height="{TemplateBinding Height}"
Background="#e8e8e8"
BorderBrush="#e8e8e8"
BorderThickness="2"
CornerRadius="10" />
<Border x:Name="NormalBorderOff"
Grid.ColumnSpan="3"
Width="44"
Height="{TemplateBinding Height}"
Background="White"
BorderBrush="#2a303a"
BorderThickness="2"
CornerRadius="10" />
<Border x:Name="HoverBorderOff"
Grid.ColumnSpan="3"
Width="44"
Height="{TemplateBinding Height}"
Background="#656b75"
BorderBrush="#656b75"
BorderThickness="2"
CornerRadius="10" />
<Border x:Name="DisabledBorderOff"
Grid.ColumnSpan="3"
Width="44"
Height="{TemplateBinding Height}"
Background="#FFFFFF"
BorderBrush="#e1e1e1"
BorderThickness="2"
CornerRadius="10" />
<Ellipse x:Name="NormalShapeOff"
Grid.Column="0"
Grid.ColumnSpan="2"
Width="10"
Height="10"
Margin="6,0"
HorizontalAlignment="Left"
Fill="#656b75" />
<Ellipse x:Name="HoverShapeOff"
Grid.Column="0"
Grid.ColumnSpan="2"
Width="10"
Height="10"
Margin="6,0"
HorizontalAlignment="Left"
Fill="#FFFFFF" />
<Ellipse x:Name="DisabledShapeOff"
Grid.Column="0"
Grid.ColumnSpan="2"
Width="10"
Height="10"
Margin="6,0"
HorizontalAlignment="Left"
Fill="#e1e1e1" />
<Ellipse x:Name="DisabledShapeOn"
Grid.Column="1"
Grid.ColumnSpan="2"
Width="10"
Height="10"
Margin="6,0"
HorizontalAlignment="Right"
Fill="#cccccc" />
<Ellipse x:Name="NormalOrHoverShapeOn"
Grid.Column="1"
Grid.ColumnSpan="2"
Width="10"
Height="10"
Margin="6,0"
HorizontalAlignment="Right"
Fill="#FFFFFF" />
<TextBlock Name="TextBlockOff"
Grid.Column="4"
Margin="12,0,0,0"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
Foreground="{TemplateBinding Foreground}"
Text="Off"
TextAlignment="Left" />
<TextBlock Name="TextBlockOn"
Grid.Column="4"
Margin="12,0,0,0"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
Foreground="{TemplateBinding Foreground}"
Text="On"
TextAlignment="Left" />
<TextBlock Name="TextBlockDisabled"
Grid.Column="4"
Margin="12,0,0,0"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
Foreground="#B1B1B1"
Text="Disabled"
TextAlignment="Left" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="False">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource NormalUncheckedStoryboard}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource NormalUncheckedStoryboard}" />
</Trigger.ExitActions>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource NormalCheckedStoryboard}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource NormalCheckedStoryboard}" />
</Trigger.ExitActions>
</Trigger>
<!--<Trigger Property="IsPressed" Value="True">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource NormalCheckedStoryboard}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource NormalUncheckedStoryboard}" />
</Trigger.ExitActions>
</Trigger>-->
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="False" />
<Condition Property="IsChecked" Value="False" />
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource NormalUncheckedStoryboard}" />
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource NormalUncheckedStoryboard}" />
</MultiTrigger.ExitActions>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="False" />
<Condition Property="IsChecked" Value="True" />
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource NormalCheckedStoryboard}" />
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource NormalCheckedStoryboard}" />
</MultiTrigger.ExitActions>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsChecked" Value="False" />
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource HoverUncheckedStoryboard}" />
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource NormalUncheckedStoryboard}" />
</MultiTrigger.ExitActions>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsChecked" Value="True" />
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource HoverCheckedStoryboard}" />
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource NormalCheckedStoryboard}" />
</MultiTrigger.ExitActions>
</MultiTrigger>
<!--<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsChecked" Value="False" />
<Condition Property="IsPressed" Value="False" />
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource NormalUncheckedStoryboard}" />
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource NormalUncheckedStoryboard}" />
</MultiTrigger.ExitActions>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsChecked" Value="False" />
<Condition Property="IsPressed" Value="True" />
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource NormalCheckedStoryboard}" />
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource NormalCheckedStoryboard}" />
</MultiTrigger.ExitActions>
</MultiTrigger>-->
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsEnabled" Value="False" />
<Condition Property="IsChecked" Value="True" />
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource DisabledCheckedStoryboard}" />
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource DisabledCheckedStoryboard}" />
</MultiTrigger.ExitActions>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsEnabled" Value="False" />
<Condition Property="IsChecked" Value="False" />
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource DisabledUncheckedStoryboard}" />
</MultiTrigger.EnterActions>
<MultiTrigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource DisabledUncheckedStoryboard}" />
</MultiTrigger.ExitActions>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*" />
<ColumnDefinition Width="5*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Grid.Column="0"
Text="Toggle Button - Checked and Disabled" />
<ToggleButton Grid.Row="0"
Grid.Column="1"
Content="ToggleButton"
IsChecked="True"
IsEnabled="False"
Style="{StaticResource ToggleButtonStyle}" />
<TextBlock Grid.Row="1"
Grid.Column="0"
Text="Toggle Button - Unchecked and Disabled" />
<ToggleButton Grid.Row="1"
Grid.Column="1"
Content="ToggleButton"
IsChecked="False"
IsEnabled="False"
Style="{StaticResource ToggleButtonStyle}" />
<TextBlock Grid.Row="2"
Grid.Column="0"
Text="Toggle Button - Normal" />
<ToggleButton Name="NormalToggleButton"
Grid.Row="2"
Grid.Column="1"
Content="ToggleButton"
Style="{StaticResource ToggleButtonStyle}" />
</Grid>
</Window>