-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.xaml
More file actions
109 lines (102 loc) · 6.02 KB
/
App.xaml
File metadata and controls
109 lines (102 loc) · 6.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?xml version="1.0" encoding="UTF-8" ?>
<Application
x:Class="CodingWithCalvin.VSToolbox.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:CodingWithCalvin.VSToolbox"
xmlns:converters="using:CodingWithCalvin.VSToolbox.Converters"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
</ResourceDictionary.MergedDictionaries>
<!-- Override ToggleSwitch accent color to purple -->
<SolidColorBrush x:Key="ToggleSwitchFillOn" Color="#68217A"/>
<SolidColorBrush x:Key="ToggleSwitchFillOnPointerOver" Color="#7B2A91"/>
<SolidColorBrush x:Key="ToggleSwitchFillOnPressed" Color="#551A66"/>
<SolidColorBrush x:Key="ToggleSwitchFillOnDisabled" Color="#4D68217A"/>
<!-- Converters -->
<converters:NullToBoolConverter x:Key="NullToBoolConverter"/>
<converters:FilePathToImageConverter x:Key="FilePathToImageConverter"/>
<converters:CountToVisibilityConverter x:Key="CountToVisibilityConverter"/>
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
<converters:ChannelTypeToBrushConverter x:Key="ChannelTypeToBrushConverter"/>
<x:Double x:Key="AppFontSize">14</x:Double>
<Style x:Key="AppTitleStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{ThemeResource TextFillColorPrimaryBrush}" />
</Style>
<Style x:Key="PrimaryAction" TargetType="Button" BasedOn="{StaticResource AccentButtonStyle}">
<Setter Property="FontSize" Value="{StaticResource AppFontSize}" />
<Setter Property="Padding" Value="14,10" />
<Setter Property="CornerRadius" Value="8" />
</Style>
<!-- Subtle icon button style with hover effect -->
<Style x:Key="SubtleIconButton" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="8"/>
<Setter Property="Opacity" Value="0.5"/>
</Style>
<!-- Modern pill-style tab for RadioButton -->
<Style x:Key="PillTabStyle" TargetType="RadioButton">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{ThemeResource TextFillColorSecondaryBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="12,8"/>
<Setter Property="MinWidth" Value="0"/>
<Setter Property="MinHeight" Value="0"/>
<Setter Property="CornerRadius" Value="6"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid x:Name="RootGrid">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CheckStates">
<VisualState x:Name="Checked">
<VisualState.Setters>
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource TextFillColorPrimaryBrush}"/>
<Setter Target="ActiveIndicator.Opacity" Value="1"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Unchecked"/>
<VisualState x:Name="Indeterminate"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border
x:Name="RootBorder"
Grid.Row="0"
Background="{TemplateBinding Background}"
CornerRadius="{TemplateBinding CornerRadius}"
Padding="{TemplateBinding Padding}">
<ContentPresenter
x:Name="ContentPresenter"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Foreground="{TemplateBinding Foreground}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<!-- Active indicator bar -->
<Border
x:Name="ActiveIndicator"
Grid.Row="1"
Height="3"
Margin="4,4,4,0"
CornerRadius="2"
Background="#68217A"
Opacity="0"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>