forked from JamesCJ60/Universal-x86-Tuning-Utility
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
194 lines (184 loc) · 14.4 KB
/
MainWindow.xaml
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
<Window x:Class="AATUV3.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:AATUV3"
mc:Ignorable="d" Name="home"
Title="AMD APU Tuning Utility" Height="668" Width="1144"
WindowStartupLocation="CenterScreen" WindowStyle="None"
Background="Transparent" AllowsTransparency="True"
ResizeMode="NoResize" WindowState="Normal" Closing="home_Closing" >
<Window.Resources>
<Style x:Key="Flash" TargetType="{x:Type RadioButton}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryGrayColor}"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Border x:Name="menuButton" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="45"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border x:Name="btnSelected" CornerRadius="4" Grid.ColumnSpan="2" HorizontalAlignment="Right" Width="210"/>
<Rectangle x:Name="Indicator" HorizontalAlignment="Left" Height="40" RadiusX="2" RadiusY="2" VerticalAlignment="Center" Width="4"/>
<Path x:Name="Icon" Data="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type RadioButton}}}" Fill="{DynamicResource PrimaryGrayColor}" HorizontalAlignment="Right" Height="27" Margin="0 0 5 0" Stretch="Uniform" VerticalAlignment="Center" Width="25"/>
<TextBlock x:Name="txtName" Grid.Column="1" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding FontWeight}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="Left" Margin="12 0 0 0" Text="{TemplateBinding Content}" VerticalAlignment="Center"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" TargetName="txtName" Value="{DynamicResource PrimaryBlueColor}"/>
<Setter Property="Fill" TargetName="Icon" Value="{DynamicResource PrimaryBlueColor}"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Fill" TargetName="Icon" Value="{DynamicResource PrimaryBlueColor}"/>
<Setter Property="Fill" TargetName="Indicator" Value="{DynamicResource PrimaryBlueColor}"/>
<Setter Property="Height" TargetName="Indicator" Value="20"/>
<Setter Property="Background" TargetName="btnSelected" Value="{DynamicResource SecundaryGrayColor}"/>
<Setter Property="Foreground" TargetName="txtName" Value="{DynamicResource PrimaryBlueColor}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FlashButton" TargetType="{x:Type RadioButton}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryGrayColor}"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Border x:Name="menuButton" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="45"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border x:Name="btnSelected" CornerRadius="4" Grid.ColumnSpan="2" HorizontalAlignment="Right" Width="250"/>
<Rectangle x:Name="Indicator" HorizontalAlignment="Left" Height="40" RadiusX="2" RadiusY="2" VerticalAlignment="Center" Width="4"/>
<Path x:Name="Icon" Data="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type RadioButton}}}" Fill="{DynamicResource PrimaryGrayColor}" HorizontalAlignment="Right" Height="25" Margin="0 0 5 0" Stretch="Uniform" VerticalAlignment="Center" Width="24"/>
<TextBlock x:Name="txtName" Grid.Column="1" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding FontWeight}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="Left" Margin="13 0 0 0" Text="{TemplateBinding Content}" VerticalAlignment="Center"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" TargetName="txtName" Value="{DynamicResource PrimaryBlueColor}"/>
<Setter Property="Fill" TargetName="Icon" Value="{DynamicResource PrimaryBlueColor}"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Fill" TargetName="Icon" Value="{DynamicResource PrimaryBlueColor}"/>
<Setter Property="Fill" TargetName="Indicator" Value="{DynamicResource PrimaryBlueColor}"/>
<Setter Property="Height" TargetName="Indicator" Value="20"/>
<Setter Property="Background" TargetName="btnSelected" Value="{DynamicResource SecundaryGrayColor}"/>
<Setter Property="Foreground" TargetName="txtName" Value="{DynamicResource PrimaryBlueColor}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Border CornerRadius="8" Background="{DynamicResource PrimaryBackgroundColor}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!-- Start: GridColum Left-->
<Border CornerRadius="8 0 0 8" Background="{DynamicResource SecundaryBackgroundColor}">
<Grid x:Name="gridMenu" Width="60">
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="80"/>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<!-- Logo
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Top">
<Path Data="{DynamicResource logo}" Margin="16 0 0 0" Stretch="Fill" Fill="{DynamicResource PrimaryBlueColor}" Width="25" Height="25" HorizontalAlignment="Left"/>
<Label Content="Orizon" Foreground="{DynamicResource PrimaryBlueColor}" FontWeight="Bold" FontSize="20" VerticalAlignment="Center" HorizontalContentAlignment="Left" HorizontalAlignment="Left" Margin="14 0 0 0"/>
</StackPanel> -->
<!-- Menu -->
<ToggleButton x:Name="btnMenu" HorizontalAlignment="Left" BorderThickness="0" Background="Transparent" VerticalAlignment="Center" Style="{StaticResource MenuIconStyle}" Margin="15 0 0 0">
<ToggleButton.Triggers>
<EventTrigger RoutedEvent="ToggleButton.Unchecked">
<BeginStoryboard>
<Storyboard x:Name="HideStackPanel">
<DoubleAnimation Storyboard.TargetName="gridMenu" Storyboard.TargetProperty="Width" BeginTime="0:0:0" From="220" To="60" Duration="0:0:0.1">
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="ToggleButton.Checked">
<BeginStoryboard>
<Storyboard x:Name="ShowStackPanel">
<DoubleAnimation Storyboard.TargetName="gridMenu" Storyboard.TargetProperty="Width" BeginTime="0:0:0" From="60" To="220" Duration="0:0:0.1">
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</ToggleButton.Triggers>
</ToggleButton>
<StackPanel Margin="0,0,0,10" Grid.RowSpan="3" Grid.Row="1">
<RadioButton x:Name="rdHome" IsChecked="True" Content="Home" Style="{DynamicResource MenuRadioButtonStyle}" Tag="{DynamicResource home}" Click="rdHome_Click" Height="50"/>
<RadioButton x:Name="rdSnow" IsChecked="False" Content="Project Snowdrop" Style="{DynamicResource MenuRadioButtonStyle}" Tag="{DynamicResource plant}" Click="rdSnow_Click" Height="50"/>
<RadioButton x:Name="rdCustom" IsChecked="False" Content="Custom Presets" Style="{DynamicResource MenuRadioButtonStyle}" Tag="{DynamicResource custom}" Height="50" Click="rdCustom_Click"/>
<RadioButton x:Name="rdAC" IsChecked="False" Content="Armoury Crate" Style="{DynamicResource MenuRadioButtonStyle}" Tag="{DynamicResource ac}" Height="50" Click="rdAC_Click" Visibility="Collapsed"/>
<RadioButton x:Name="rdAdaptive" IsChecked="False" Content="Adaptive Performance" Style="{DynamicResource FlashButton}" Tag="{DynamicResource flash}" Height="50" Click="rdAdaptive_Click"/>
<RadioButton x:Name="rdClock" IsChecked="False" Content="Clock Control" Style="{DynamicResource MenuRadioButtonStyle}" Tag="{DynamicResource speed}" Height="50" Click="rdClock_Click"/>
<RadioButton x:Name="rdFSR" IsChecked="False" Content="Magpie FSR" Style="{DynamicResource MenuRadioButtonStyle}" Tag="{DynamicResource FSR}" Height="50" Click="rdFSR_Click"/>
<RadioButton x:Name="rdInfo" IsChecked="False" Content="Info" Style="{DynamicResource MenuRadioButtonStyle}" Tag="{DynamicResource info}" Height="50" Click="rdInfo_Click"/>
<RadioButton x:Name="rdSettings" IsChecked="False" Content="Settings" Style="{DynamicResource MenuRadioButtonStyle}" Tag="{DynamicResource settings}" Height="50" Click="rdSettings_Click"/>
</StackPanel>
</Grid>
</Border>
<!-- End: GridColum Left-->
<!-- Start: GridColumn Rigth -->
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition/>
</Grid.RowDefinitions>
<!-- Start: Button Close | Restore | Minimize -->
<Border BorderBrush="Black" BorderThickness="0" Margin="0,0,0,27" CornerRadius="0,8,0,0" Background="{DynamicResource SecundaryBackgroundColor}" MouseDown="Window_MouseDown">
<Label Name="lblMenu" Content="HOME" FontSize="16" Foreground="#FF545454" FontWeight="Normal" FontFamily="Segoe UI Semibold" HorizontalAlignment="Center" Margin="0,0,0,0"/>
</Border>
<!-- Start: Button Close | Restore | Minimize -->
<StackPanel Grid.Row="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,2,4,0" Height="30" Orientation="Horizontal" FlowDirection="RightToLeft">
<Button x:Name="btnClose" Style="{StaticResource IconButtonsStyle}" Content="{DynamicResource close}" Click="btnClose_Click" Tag="IsCloseButton"/>
<Button x:Name="btnMinimize" Style="{DynamicResource IconButtonsStyle}" Content="{DynamicResource minimize}" Click="btnMinimize_Click"/>
<Button x:Name="btnRestore" Margin="5,0" Click="btnRestore_Click" Visibility="Hidden">
<Button.Style>
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource IconButtonsStyle}">
<Setter Property="Content" Value="{DynamicResource maximize}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding WindowState, ElementName=home}" Value="Maximized">
<Setter Property="Content" Value="{DynamicResource restore}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
</StackPanel>
<!-- End: Button Close | Restore | Minimize -->
<Border Grid.Row="1" Margin="10">
<Frame x:Name="PagesNavigation" NavigationUIVisibility="Hidden" Margin="-8,-36,-9,-5">
<!-- Page Content -->
</Frame>
</Border>
</Grid>
<!-- Start: GridColumn Rigth -->
</Grid>
</Border>
</Window>