跳到主要内容

github/tai

公开

Tai · Windows 软件与网站使用时长统计。上游 Planshit/Tai 的源码镜像,非灵栈原创;MIT 许可。来源:https://github.com/Planshit/Tai 。本次为手动同步,暂不提供安装包。

浏览文件

ChartsItemTypeColumn.xaml

84 行 · 4.8 KB历史下载
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 <!--<Setter Property="Margin" Value="5,0"/>-->
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 <!--<ColorAnimation Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
50 Storyboard.TargetName="IconBorder" To="#2b20d9" >
51 <ColorAnimation.EasingFunction>
52 <CubicEase EasingMode="EaseInOut"/>
53 </ColorAnimation.EasingFunction>
54 </ColorAnimation>
55 <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
56 Storyboard.TargetName="IconBorder" To="#ffffff" >
57 <ColorAnimation.EasingFunction>
58 <CubicEase EasingMode="EaseInOut"/>
59 </ColorAnimation.EasingFunction>
60 </ColorAnimation>-->
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 <!--<Trigger Property="IsLoading" Value="True">
76 <Setter TargetName="Loading" Property="Visibility" Value="Visible"/>
77 <Setter TargetName="Normal" Property="Visibility" Value="Hidden"/>
78 </Trigger>-->
79 </ControlTemplate.Triggers>
80 </ControlTemplate>
81 </Setter.Value>
82 </Setter>
83 </Style>
84</ResourceDictionary>