-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
211 lines (198 loc) · 11.6 KB
/
MainWindow.xaml
File metadata and controls
211 lines (198 loc) · 11.6 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<Window x:Class="TweakHub.MainWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TweakHub"
xmlns:ui="http://schemas.modernwpf.com/2019"
mc:Ignorable="d"
Title="TweakHub - Windows 11 Performance Optimizer"
Height="900" Width="1400"
MinHeight="700" MinWidth="1200"
WindowStartupLocation="CenterScreen"
Icon="ico.ico"
Background="{DynamicResource SystemControlBackgroundBaseLowBrush}">
<Window.Resources>
<Style x:Key="SidebarButtonStyle" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="16,12"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="Margin" Value="0,2"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Border"
Background="{TemplateBinding Background}"
CornerRadius="6"
Margin="8,0">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="Center"
Margin="{TemplateBinding Padding}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="Background"
Value="{DynamicResource SystemControlBackgroundListLowBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Border" Property="Background"
Value="{DynamicResource SystemControlBackgroundListMediumBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ActiveSidebarButtonStyle" TargetType="Button" BasedOn="{StaticResource SidebarButtonStyle}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="{StaticResource AccentBrush}"
BorderThickness="1.5"
CornerRadius="8"
Margin="8,0">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="Center"
Margin="{TemplateBinding Padding}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource SystemControlBackgroundListLowBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource SystemControlBackgroundListMediumBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="280"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Sidebar -->
<Border Grid.Column="0"
Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}"
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
BorderThickness="0,0,1,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Header -->
<StackPanel Grid.Row="0" Margin="20,24,20,20">
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
<!-- Modern Logo Design -->
<Border Width="32" Height="32" CornerRadius="8" Background="#1A1A1A" BorderBrush="{StaticResource AccentBrush}" BorderThickness="2">
<TextBlock Text="TH" FontSize="14" FontWeight="Bold"
Foreground="{StaticResource AccentBrush}" HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<TextBlock Text="TweakHub" FontSize="20" FontWeight="SemiBold"
Margin="12,0,0,0" VerticalAlignment="Center"
Foreground="{DynamicResource SystemControlForegroundBaseHighBrush}"/>
</StackPanel>
<TextBlock Text="Powered by Prime Build"
FontSize="12"
Foreground="{DynamicResource SystemControlForegroundBaseMediumBrush}"/>
</StackPanel>
<!-- Navigation -->
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
<StackPanel Margin="12,0">
<Button x:Name="RegistryTweaksButton" Style="{StaticResource SidebarButtonStyle}"
Click="RegistryTweaksButton_Click">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock Text="⚡" FontSize="16" Margin="0,0,12,0"
Foreground="{DynamicResource IconBrush}"/>
<TextBlock Text="Registry Tweaks"/>
</StackPanel>
<!-- Badge indicator -->
<Border x:Name="RegistryTweaksBadge"
Grid.Column="1"
Width="18" Height="18"
CornerRadius="9"
Background="{StaticResource AccentBrush}"
VerticalAlignment="Center"
Margin="10,0,0,0"
Visibility="Collapsed">
<TextBlock x:Name="RegistryTweaksBadgeText"
Text="0"
FontSize="10"
FontWeight="Bold"
Foreground="White"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</Grid>
</Button>
<Button x:Name="ExternalToolsButton" Style="{StaticResource SidebarButtonStyle}"
Click="ExternalToolsButton_Click">
<StackPanel Orientation="Horizontal">
<TextBlock Text="🔧" FontSize="16" Margin="0,0,12,0"
Foreground="{DynamicResource IconBrush}"/>
<TextBlock Text="External Tools"/>
</StackPanel>
</Button>
<Button x:Name="AutomatedScriptsButton" Style="{StaticResource SidebarButtonStyle}"
Click="AutomatedScriptsButton_Click">
<StackPanel Orientation="Horizontal">
<TextBlock Text="🤖" FontSize="16" Margin="0,0,12,0"
Foreground="{DynamicResource IconBrush}"/>
<TextBlock Text="Automated Scripts"/>
</StackPanel>
</Button>
<Button x:Name="QuickAccessButton" Style="{StaticResource SidebarButtonStyle}"
Click="QuickAccessButton_Click">
<StackPanel Orientation="Horizontal">
<TextBlock Text="🚀" FontSize="16" Margin="0,0,12,0"
Foreground="{DynamicResource IconBrush}"/>
<TextBlock Text="Quick Access"/>
</StackPanel>
</Button>
<Button x:Name="AboutButton" Style="{StaticResource SidebarButtonStyle}"
Click="AboutButton_Click">
<StackPanel Orientation="Horizontal">
<TextBlock Text="ℹ️" FontSize="16" Margin="0,0,12,0"
Foreground="{DynamicResource IconBrush}"/>
<TextBlock Text="About"/>
</StackPanel>
</Button>
</StackPanel>
</ScrollViewer>
<!-- Footer -->
<StackPanel Grid.Row="2" Margin="20,12,20,20">
<Separator Margin="0,0,0,12"/>
<Button x:Name="ThemeToggleButton" Style="{StaticResource SidebarButtonStyle}"
Click="ThemeToggleButton_Click">
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="ThemeIcon" Text="🌙" FontSize="16" Margin="0,0,12,0"
Foreground="{DynamicResource IconBrush}"/>
<TextBlock x:Name="ThemeText" Text="Dark Theme"/>
</StackPanel>
</Button>
</StackPanel>
</Grid>
</Border>
<!-- Main Content -->
<Grid Grid.Column="1" Background="{DynamicResource SystemControlBackgroundBaseLowBrush}">
<Frame x:Name="MainFrame" NavigationUIVisibility="Hidden"
Background="{DynamicResource SystemControlBackgroundBaseLowBrush}"/>
</Grid>
</Grid>
</Window>