-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
121 lines (120 loc) · 7.86 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
<Window x:Class="WellBites.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:fa="http://schemas.fontawesome.io/icons/"
xmlns:local="clr-namespace:WellBites"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
SizeChanged="OnWindowSizeChanged"
Loaded="MainWindow_OnLoaded"
mc:Ignorable="d"
WindowStyle="None"
Background="Transparent"
AllowsTransparency="True"
WindowStartupLocation="CenterScreen"
Title="WellBites" Height="800" Width="1400">
<Window.Resources>
</Window.Resources>
<Border Margin="30" x:Name="BorderMain" Background="{DynamicResource BackgroundColor}" CornerRadius="10" BorderThickness="1" BorderBrush="{DynamicResource BorderColor}">
<Border.Effect>
<DropShadowEffect BlurRadius="40" ShadowDepth="0" Opacity="0.4" Color="Black"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border x:Name="BorderTitleBar" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderColor}" MouseDown="OnTitleBarMouseDown" Height="40" VerticalAlignment="Center" CornerRadius="7,7,0,0" Background="{DynamicResource TitleBarColor}" Margin="-1,-1,-1,0">
<Grid x:Name="GridTitleBar" Margin="-1,-1,-1,0" Height="40" VerticalAlignment="Top">
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Width="100" Margin="0,0,146,0">
<Path Data="{DynamicResource Sun}" Height="16" Width="16" Stretch="UniformToFill" Fill="{DynamicResource SunIconColor}" VerticalAlignment="Center"/>
<ToggleButton x:Name="ThemesToggleButton"
IsChecked="False"
Click="OnThemesClick"
HorizontalAlignment="Right"
Style="{DynamicResource MyToggleButton}"
Margin="10 0 10 0"/>
<Path Data="{DynamicResource Moon}" Height="16" Width="16" Stretch="Fill" Fill="{DynamicResource MoonIconColor}" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Margin="0,-0.1,0,0" Orientation="Horizontal" Height="40" VerticalAlignment="Center" HorizontalAlignment="Right" Width="150">
<StackPanel.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="Margin" Value="3,0,0,0"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource TitleBarButtonsHover}"/>
</Trigger>
</Style.Triggers>
</Style>
</StackPanel.Resources>
<Button Name="BtnMinimize" Click="OnBtnMinimizeClick" Width="48" Height="40">
<Path Fill="{DynamicResource TitleBarTextColor}" Width="12" Height="2" Stretch="Fill">
<Path.Data>
<PathGeometry Figures="M3 9.25H13V8.25H3V9.25Z" FillRule="EvenOdd"/>
</Path.Data>
</Path>
</Button>
<Button Name="BtnFullScreen" Click="OnBtnFullScreenClick" Width="48" Height="40">
<Path Fill="{DynamicResource TitleBarTextColor}" Width="12" Height="12" Stretch="Fill">
<Path.Data>
<PathGeometry Figures="M3 13.25H12.9995V3.25H3V13.25ZM4.00005 12.25H11.9994V4.25H4.00005V12.25Z" FillRule="EvenOdd"/>
</Path.Data>
</Path>
</Button>
<Button Click="OnBtnCloseClick" Name="BtnClose" Width="48" Height="40">
<Path VerticalAlignment="Center" Width="12" Height="12" Stretch="Fill">
<Path.Data>
<PathGeometry Figures="M12.5 3.00003L8.354 7.14703L4.207 3.00003L3.5 3.70703L7.646 7.85403L3.5 12L4.207 12.707L8.354 8.56103L12.5 12.707L13.207 12L9.06 7.85403L13.207 3.70703L12.5 3.00003Z" FillRule="EvenOdd"/>
</Path.Data>
<Path.Style>
<Style TargetType="{x:Type Path}">
<Setter Property="Fill" Value="{DynamicResource TitleBarTextColor}"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=BtnClose, Path=IsMouseOver}" Value="True">
<Setter Property="Fill" Value="White"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}" CornerRadius="0,7,0,0">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Margin" Value="0,0,0,0"></Setter>
<Setter Property="Background" Value="Transparent"></Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#EB4C42"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
</StackPanel>
</Grid>
</Border>
<Grid Grid.Row="1">
<Frame NavigationUIVisibility="Hidden" x:Name="frame"></Frame>
</Grid>
</Grid>
</Border>
</Window>