12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <Application x:Class="Flyinsono.Client.Test.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:Flyinsono.Client.Test"
- StartupUri="MainWindow.xaml">
- <Application.Resources>
- <Style TargetType="Button">
- <Setter Property="Margin" Value="7"/>
- <Setter Property="Width" Value="80"/>
- </Style>
- <Style TargetType="TextBox">
- <Setter Property="Margin" Value="7"/>
- <Setter Property="MinWidth" Value="120"/>
- </Style>
- <Style x:Key="CommonButtonStyle" TargetType="Button" >
- <Setter Property="Margin" Value="7"/>
- <Setter Property="Width" Value="80"/>
- <Setter Property="Command" Value="{Binding}"/>
- <Setter Property="BorderBrush" Value="#4cae4c"/>
- <Setter Property="Background" Value="#5cb85c"/>
- <Setter Property="Foreground" Value="#fff"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="4" Name="container" Cursor="Hand" Padding="{TemplateBinding Padding}"
- BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"
- Background="{TemplateBinding Background}">
- <ContentPresenter ContentSource="{TemplateBinding Content}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup Name="CommonStates">
- <VisualState Name="Normal">
- </VisualState>
- <VisualState Name="MouseOver">
- <Storyboard>
- <ColorAnimation Storyboard.TargetName="container" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
- Duration="0:0:0.02" To="#449d44"></ColorAnimation>
- <ColorAnimation Storyboard.TargetName="container" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
- Duration="0:0:0.02" To="#398439"></ColorAnimation>
- </Storyboard>
- </VisualState>
- <VisualState Name="Pressed">
- <Storyboard>
- <ColorAnimation Storyboard.TargetName="container" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
- Duration="0:0:0.02" To="#398439"></ColorAnimation>
- <ColorAnimation Storyboard.TargetName="container" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
- Duration="0:0:0.02" To="#255625"></ColorAnimation>
- </Storyboard>
- </VisualState>
- <VisualState Name="Disabled">
- <Storyboard>
- <ColorAnimation Storyboard.TargetName="container" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
- Duration="0:0:0.02" To="#5cb85c"></ColorAnimation>
- <ColorAnimation Storyboard.TargetName="container" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
- Duration="0:0:0.02" To="#4cae4c"></ColorAnimation>
- <DoubleAnimation Storyboard.TargetName="container" Storyboard.TargetProperty="Opacity"
- Duration="0:0:0.02" To="0.7"></DoubleAnimation>
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Application.Resources>
- </Application>
|