<?xml version="1.0" encoding="utf-8"?>
<Application x:Class="CollectionViewDemo2010.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Application.Resources>
        
    	<Style TargetType="Button">
    		<Setter Property="Padding" Value="3" />
            <Setter Property="Foreground" Value="White" />
            <Setter Property="Height" Value="36" />
            <Setter Property="FontWeight" Value="Bold" />
		    <Setter Property="Template">
			    <Setter.Value>
				    <ControlTemplate TargetType="ButtonBase">
					    <Grid>
						    <VisualStateManager.VisualStateGroups>
							    <VisualStateGroup x:Name="CommonStates">
								    <VisualState x:Name="Normal" />
								    <VisualState x:Name="MouseOver">
									    <Storyboard>
										    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
											    <DiscreteObjectKeyFrame KeyTime="00:00:00">
												    <DiscreteObjectKeyFrame.Value>
													    <Visibility>Visible</Visibility>
												    </DiscreteObjectKeyFrame.Value>
											    </DiscreteObjectKeyFrame>
										    </ObjectAnimationUsingKeyFrames>
									    </Storyboard>
								    </VisualState>
								    <VisualState x:Name="Pressed">
									    <Storyboard>
										    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PressedElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
											    <DiscreteObjectKeyFrame KeyTime="00:00:00">
												    <DiscreteObjectKeyFrame.Value>
													    <Visibility>Visible</Visibility>
												    </DiscreteObjectKeyFrame.Value>
											    </DiscreteObjectKeyFrame>
										    </ObjectAnimationUsingKeyFrames>
									    </Storyboard>
								    </VisualState>
								    <VisualState x:Name="Disabled">
									    <Storyboard>
										    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BackgroundElement" />
									    </Storyboard>
								    </VisualState>
							    </VisualStateGroup>
							    <VisualStateGroup x:Name="CheckStates">
								    <VisualState x:Name="Checked">
									    <Storyboard>
										    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
											    <DiscreteObjectKeyFrame KeyTime="00:00:00">
												    <DiscreteObjectKeyFrame.Value>
													    <Visibility>Visible</Visibility>
												    </DiscreteObjectKeyFrame.Value>
											    </DiscreteObjectKeyFrame>
										    </ObjectAnimationUsingKeyFrames>
									    </Storyboard>
								    </VisualState>	
								    <VisualState x:Name="Unchecked" />
							    </VisualStateGroup>
							    <VisualStateGroup x:Name="FocusStates">
								    <VisualState x:Name="Focused">
									    <Storyboard>
										    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement" />
									    </Storyboard>
								    </VisualState>
								    <VisualState x:Name="Unfocused" />
							    </VisualStateGroup>
						    </VisualStateManager.VisualStateGroups>
						    <Border x:Name="BackgroundElement" Background="#FF2B4C66" />
						    <Border x:Name="CheckedElement" Background="#FFFF7612" Visibility="Collapsed" />
						    <Border x:Name="MouseOverElement" Background="#FF55C5EA" Visibility="Collapsed" />
						    <Border x:Name="PressedElement" Background="#FFFF7612" Visibility="Collapsed" />
								
						    <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
						    <Border x:Name="FocusVisualElement" BorderBrush="#FFFF7612" BorderThickness="2" IsHitTestVisible="false" Opacity="0" />
					    </Grid>
				    </ControlTemplate>
			    </Setter.Value>
		    </Setter>
    	</Style>
        
    </Application.Resources>
</Application>