|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="OptionsButtonUp" TargetType="Rectangle">
<Setter Property="Fill">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#445566" Offset="0.2" />
<GradientStop Color="#000000" Offset="0.7" />
<GradientStop Color="#555555" Offset="1.0" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="OptionsButtonOver" TargetType="Rectangle">
<Setter Property="Fill">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#446688" Offset="0.2" />
<GradientStop Color="#222222" Offset="0.7" />
<GradientStop Color="#666666" Offset="1.0" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="OptionsButtonDown" TargetType="Rectangle">
<Setter Property="Fill">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#223344" Offset="0.2" />
<GradientStop Color="#000000" Offset="0.7" />
<GradientStop Color="#444444" Offset="1.0" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="OptionsButton" TargetType="Button">
<Setter Property="Margin" Value="10" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
<Rectangle x:Name="ButtonRect" RadiusX="10" RadiusY="10"
StrokeThickness="2" Stroke="#555555"
Style="{StaticResource OptionsButtonUp}" />
<ContentPresenter x:Name="ButtonContent"
Content="{TemplateBinding Content}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
TextElement.FontSize="20"
TextElement.Foreground="#C8C8C8"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ButtonRect" Property="Style"
Value="{StaticResource OptionsButtonOver}" />
<Setter TargetName="ButtonContent" Property="TextElement.Foreground"
Value="#FFFFFF" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="ButtonRect" Property="Style"
Value="{StaticResource OptionsButtonDown}" />
<Setter TargetName="ButtonContent" Property="TextElement.Foreground"
Value="#AAAAAA" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|
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.
Barry Dorman is a software engineer from the Birmingham, AL area. His primary focus is ASP.NET. Barry graduated with a BS in Electrical Engineering from The University of Alabama at Birmingham in 2006. Since then, he has kept himself busy working in the healthcare industry.