跳到主要内容

github/tai

公开

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

浏览文件

ChartsItemTypeMonth.xaml

74 行 · 3.9 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:ChartsItemTypeMonth}">
6 <Setter Property="SnapsToDevicePixels"
7 Value="true" />
8
9 <Setter Property="Background" Value="Transparent"/>
10 <Setter Property="Margin" Value="5"/>
11 <Setter Property="HorizontalAlignment" Value="Center"/>
12 <Setter Property="VerticalAlignment" Value="Center"/>
13
14 <Setter Property="Template">
15 <Setter.Value>
16 <ControlTemplate TargetType="{x:Type local:ChartsItemTypeMonth}">
17 <Grid >
18 <Grid x:Name="Normal">
19 <Border>
20 <!--<Border.Effect>
21 <DropShadowEffect BlurRadius="14" ShadowDepth="0" Direction="0" Opacity="0.05"/>
22 </Border.Effect>-->
23 <Border x:Name="Border" Margin="0" Background="{DynamicResource ChartMonthGridItemBgBrush}" CornerRadius="4" Width="20" Height="20" BorderThickness="0" BorderBrush="{DynamicResource ThemeBrush}">
24
25 <Border.Clip>
26 <RectangleGeometry RadiusX="4" RadiusY="4" Rect="0,0,20,20"/>
27 </Border.Clip>
28
29 <Grid>
30 <!--<TextBlock x:Name="ValueTextObj"/>-->
31 <Rectangle
32 x:Name="ValueBlockObj"
33
34
35 HorizontalAlignment="Stretch"
36 VerticalAlignment="Center"
37 >
38 <Rectangle.Effect>
39 <BlurEffect KernelType="Gaussian" Radius="20"/>
40 </Rectangle.Effect>
41 <Rectangle.Fill>
42 <LinearGradientBrush EndPoint="2,1" StartPoint="-2,0">
43 <GradientStop Color="Transparent"/>
44 <GradientStop Color="{DynamicResource ThemeColor}" Offset="1"/>
45 </LinearGradientBrush>
46 </Rectangle.Fill>
47 </Rectangle>
48 </Grid>
49
50 </Border>
51 </Border>
52
53 </Grid>
54
55 <Grid x:Name="Loading" Visibility="Collapsed">
56 <base:Placeholder CornerRadius="12" Width="150" Height="150"/>
57 </Grid>
58 </Grid>
59 <ControlTemplate.Triggers>
60 <Trigger Property="IsLoading" Value="True">
61 <Setter TargetName="Loading" Property="Visibility" Value="Visible"/>
62 <Setter TargetName="Normal" Property="Visibility" Value="Hidden"/>
63 </Trigger>
64 <Trigger Property="IsSelected" Value="True">
65 <Setter TargetName="Border" Property="BorderThickness" Value="1"/>
66 <!--<Setter TargetName="Border" Property="Background" Value="White"/>-->
67
68 </Trigger>
69 </ControlTemplate.Triggers>
70 </ControlTemplate>
71 </Setter.Value>
72 </Setter>
73 </Style>
74</ResourceDictionary>