| 1 | <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | xmlns:local="clr-namespace:UI.Controls.Charts" |
| 4 | xmlns:base="clr-namespace:UI.Controls.Base"> |
| 5 | <Style TargetType="{x:Type local:ChartItemTypeColumn}"> |
| 6 | <Setter Property="SnapsToDevicePixels" |
| 7 | Value="true" /> |
| 8 | |
| 9 | <Setter Property="Background" Value="Transparent"/> |
| 10 | |
| 11 | |
| 12 | <Setter Property="Template"> |
| 13 | <Setter.Value> |
| 14 | <ControlTemplate TargetType="{x:Type local:ChartItemTypeColumn}"> |
| 15 | |
| 16 | <Grid x:Name="Normal" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"> |
| 17 | <Grid.RowDefinitions> |
| 18 | <RowDefinition Height="*"/> |
| 19 | <RowDefinition Height="30"/> |
| 20 | </Grid.RowDefinitions> |
| 21 | <Border x:Name="ValueContainer" Background="Transparent" > |
| 22 | <Rectangle |
| 23 | x:Name="ValueBlockObj" |
| 24 | RadiusX="4" |
| 25 | RadiusY="4" |
| 26 | Fill="#cccccc" |
| 27 | Width="{Binding ElementName=ValueContainer,Path=ActualWidth}" |
| 28 | VerticalAlignment="Bottom" |
| 29 | HorizontalAlignment="Center" |
| 30 | /> |
| 31 | </Border> |
| 32 | <TextBlock Grid.Row="1" FontSize="12" HorizontalAlignment="Center" Margin="0,10,0,0" Text="{TemplateBinding ColumnName}" Foreground="#FF8A8A8A" /> |
| 33 | <VisualStateManager.VisualStateGroups> |
| 34 | <VisualStateGroup x:Name="CommonStates"> |
| 35 | <VisualStateGroup.Transitions> |
| 36 | <VisualTransition GeneratedDuration="0:0:.2" /> |
| 37 | <VisualTransition GeneratedDuration="0" |
| 38 | To="Pressed" /> |
| 39 | </VisualStateGroup.Transitions> |
| 40 | <VisualState x:Name="NormalState" /> |
| 41 | <VisualState x:Name="MouseOver"> |
| 42 | <Storyboard > |
| 43 | <ColorAnimation Storyboard.TargetProperty="(Canvas.Background).(SolidColorBrush.Color)" |
| 44 | Storyboard.TargetName="ValueContainer" To="#7FF1F1F1" > |
| 45 | <ColorAnimation.EasingFunction> |
| 46 | <CubicEase EasingMode="EaseInOut"/> |
| 47 | </ColorAnimation.EasingFunction> |
| 48 | </ColorAnimation> |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | </Storyboard> |
| 62 | </VisualState> |
| 63 | <VisualState x:Name="Pressed"> |
| 64 | |
| 65 | </VisualState> |
| 66 | </VisualStateGroup> |
| 67 | </VisualStateManager.VisualStateGroups> |
| 68 | </Grid> |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | <ControlTemplate.Triggers> |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | </ControlTemplate.Triggers> |
| 80 | </ControlTemplate> |
| 81 | </Setter.Value> |
| 82 | </Setter> |
| 83 | </Style> |
| 84 | </ResourceDictionary> |