<ToggleButton x:Class="Podder.DefaultSkin.Controls.PlayButton" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:Podder.DefaultSkin.Controls" > <ToggleButton.Resources> <Border x:Key="PlayShape" Width="26" Height="26"> <Viewbox Margin="4"> <Polygon> <Polygon.Points> <Point X="0" Y="0" /> <Point X="1" Y="0.5" /> <Point X="0" Y="1" /> </Polygon.Points> <Polygon.Style> <Style TargetType="Polygon"> <Setter Property="Fill" Value="Black" /> <Style.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Fill" Value="{DynamicResource {x:Static SystemColors.InactiveCaptionBrushKey}}" /> </Trigger> </Style.Triggers> </Style> </Polygon.Style> </Polygon> </Viewbox> </Border> <Border x:Key="PauseShape" Width="26" Height="26"> <Viewbox Margin="4"> <StackPanel Margin="3,0,0,0" Orientation="Horizontal"> <StackPanel.Resources> <Style TargetType="Line"> <Setter Property="Stroke" Value="Black" /> <Setter Property="StrokeThickness" Value="6" /> <Style.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Fill" Value="{DynamicResource {x:Static SystemColors.InactiveCaptionBrushKey}}" /> </Trigger> </Style.Triggers> </Style> </StackPanel.Resources> <Line X1="0" Y1="0" X2="0" Y2="18" /> <Rectangle Width="10" Height="18" /> <Line X1="0" Y1="0" X2="0" Y2="18" /> </StackPanel> </Viewbox> </Border> <Style TargetType="{x:Type controls:PlayButton}"> <Style.Triggers> <Trigger Property="State" Value="Pause"> <Setter Property="Content" Value="{StaticResource PauseShape}" /> <Setter Property="Command" Value="Pause" /> </Trigger> <Trigger Property="State" Value="Play"> <Setter Property="Content" Value="{StaticResource PlayShape}" /> <Setter Property="Command" Value="Play" /> </Trigger> </Style.Triggers> </Style> </ToggleButton.Resources> </ToggleButton>
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)