-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
193 lines (185 loc) · 11.5 KB
/
MainWindow.xaml
File metadata and controls
193 lines (185 loc) · 11.5 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
<Window x:Class="Lyra.Launcher.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:fw="clr-namespace:SourceChord.FluentWPF;assembly=FluentWPF"
xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:local="clr-namespace:Lyra.Launcher"
xmlns:styles="clr-namespace:Lyra.Launcher.Styles"
mc:Ignorable="d"
Icon="/Assets/lyra.ico"
AllowsTransparency="True" Loaded="MainWindow_OnLoaded"
WindowStyle="None"
ResizeMode="NoResize"
Title="MainWindow" Height="450" Width="650">
<Window.Background>
<SolidColorBrush Color="{DynamicResource WindowColor}"/>
</Window.Background>
<Window.Clip>
<RectangleGeometry Rect="0,0,650,450" RadiusX="30" RadiusY="30"/>
</Window.Clip>
<Window.CommandBindings>
<CommandBinding Command="{x:Static local:MainWindow.ShowCommand}" Executed="ShowCommandExecuted"/>
</Window.CommandBindings>
<Grid>
<Grid Name="MainGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<tb:TaskbarIcon LeftClickCommand="{x:Static local:MainWindow.ShowCommand}" IconSource="Assets/lyra.ico" Visibility="Hidden" Name="TaskbarIcon">
<tb:TaskbarIcon.ContextMenu>
<ContextMenu>
<MenuItem Header="Inject" Click="MenuItem_Inject"/>
<MenuItem Click="MenuItem_OnClick"
Header="Exit" />
</ContextMenu>
</tb:TaskbarIcon.ContextMenu>
</tb:TaskbarIcon>
<Border CornerRadius="15" Margin="20">
<Border.Background>
<SolidColorBrush Color="{DynamicResource BackgroundColor}"/>
</Border.Background>
</Border>
<Grid Grid.ColumnSpan="2" Background="Transparent" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown"/>
<Grid Margin="20">
<Grid.Clip>
<RectangleGeometry Rect="0,0,110,410"/>
</Grid.Clip>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid>
<ContentPresenter x:Name="MyContentPresenter">
<ContentPresenter.Content>
<Image Source="Assets/IconMain.png" RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform>
<ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
</Image.RenderTransform>
</Image>
</ContentPresenter.Content>
</ContentPresenter>
<Border Background="Transparent">
<Rectangle
Fill="{DynamicResource ForegroundBrush}"
Width="{Binding ElementName=MyContentPresenter, Path=ActualWidth}"
Height="{Binding ElementName=MyContentPresenter, Path=ActualHeight}">
<Rectangle.OpacityMask>
<VisualBrush Stretch="None" Visual="{Binding ElementName=MyContentPresenter}"/>
</Rectangle.OpacityMask>
<Rectangle.Effect>
<DropShadowEffect Color="{DynamicResource ForegroundColor}" ShadowDepth="0" Opacity="0.4" BlurRadius="10"/>
</Rectangle.Effect>
</Rectangle>
</Border>
</Grid>
<Grid>
<ContentPresenter x:Name="MyContentPresenter2">
<ContentPresenter.Content>
<Image Source="Assets/IconStar.png" RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform>
<ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
</Image.RenderTransform>
</Image>
</ContentPresenter.Content>
</ContentPresenter>
<Border Background="Transparent">
<Rectangle
Width="{Binding ElementName=MyContentPresenter, Path=ActualWidth}"
Height="{Binding ElementName=MyContentPresenter, Path=ActualHeight}">
<Rectangle.OpacityMask>
<VisualBrush Stretch="None" Visual="{Binding ElementName=MyContentPresenter2}"/>
</Rectangle.OpacityMask>
<Rectangle.Fill>
<SolidColorBrush Color="{DynamicResource AccentColor}"/>
</Rectangle.Fill>
<Rectangle.Effect>
<DropShadowEffect Color="{DynamicResource AccentColor}" ShadowDepth="0" Opacity="0.8" BlurRadius="10"/>
</Rectangle.Effect>
</Rectangle>
</Border>
</Grid>
<RadioButton Name="RadioButton1" Checked="Navigate_Home" Grid.Row="1" Style="{StaticResource MainRadioButtonStyle}">
<RadioButton.Tag>
<BitmapImage UriSource="/Assets/PlayIcon.png"/>
</RadioButton.Tag>
</RadioButton>
<RadioButton Checked="Navigate_News" Grid.Row="2" Style="{StaticResource MainRadioButtonStyle}">
<RadioButton.Tag>
<BitmapImage UriSource="/Assets/NewsIcon.png"/>
</RadioButton.Tag>
</RadioButton>
<RadioButton Checked="Navigate_Settings" VerticalAlignment="Bottom" Margin="0,0,0,40" Grid.Row="3" Style="{StaticResource MainRadioButtonStyle}">
<RadioButton.Tag>
<BitmapImage UriSource="/Assets/SettingsIcon.png"/>
</RadioButton.Tag>
</RadioButton>
</Grid>
<Grid Grid.Column="1" Margin="0,20,20,20">
<StackPanel Margin="0,0,0,0" Name="PageStackPanel">
<Frame Source="/Pages/HomePage.xaml"/>
<Frame Source="/Pages/NewsPage.xaml" Margin="0,20,0,20"/>
<Frame Source="/Pages/SettingsPage.xaml"/>
</StackPanel>
</Grid>
<StackPanel Name="NotificationStackPanel" Grid.ColumnSpan="2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="35,0,35,35"/>
<Border Margin="0" Padding="20" CornerRadius="0,0,0,22.5" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top">
<Border.Background>
<SolidColorBrush Color="{DynamicResource WindowColor}"/>
</Border.Background>
<Button Cursor="Hand" Click="ButtonBase_OnClick">
<Button.Template>
<ControlTemplate>
<Grid Background="Transparent">
<Path Name="Path" Data="M21.3489 3.75715C22.2079 2.89817 22.2079 1.5032 21.3489 0.644229C20.4899 -0.214743 19.095 -0.214743 18.236 0.644229L11 7.88708L3.75714 0.651101C2.89817 -0.207871 1.5032 -0.207871 0.644229 0.651101C-0.214743 1.51007 -0.214743 2.90504 0.644229 3.76402L7.88708 11L0.651101 18.2429C-0.207871 19.1018 -0.207871 20.4968 0.651101 21.3558C1.51007 22.2147 2.90504 22.2147 3.76402 21.3558L11 14.1129L18.2429 21.3489C19.1018 22.2079 20.4968 22.2079 21.3558 21.3489C22.2147 20.4899 22.2147 19.095 21.3558 18.236L14.1129 11L21.3489 3.75715Z" Fill="{DynamicResource ForegroundBrush}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Button.IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Duration="0:0:0.1" To="0.5" Storyboard.TargetName="Path" Storyboard.TargetProperty="Opacity"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Duration="0:0:0.1" To="1" Storyboard.TargetName="Path" Storyboard.TargetProperty="Opacity"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Border>
</Grid>
<Grid Name="DialogGrid" Visibility="Hidden">
<Grid.Background>
<SolidColorBrush x:Name="SolidColorBrush" Color="Black" Opacity="0.0"/>
</Grid.Background>
<Border Name="DialogBorder" CornerRadius="15" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="125,50,125,50" Padding="10" RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<ScaleTransform ScaleX="0" ScaleY="0"/>
</Border.RenderTransform>
<Border.Effect>
<DropShadowEffect Color="{DynamicResource BackgroundColor}" ShadowDepth="0" BlurRadius="10"/>
</Border.Effect>
<Border.Background>
<SolidColorBrush Color="{DynamicResource BackgroundColor}"/>
</Border.Background>
<StackPanel>
<TextBlock Name="DialogTitle" HorizontalAlignment="Center" FontSize="16" Text="Title" FontFamily="/Assets/#Inter" Foreground="{DynamicResource ForegroundBrush}" FontWeight="SemiBold"/>
<TextBlock Name="DialogBody" HorizontalAlignment="Left" FontSize="12" TextWrapping="Wrap" FontFamily="/Assets/#Inter" Foreground="{DynamicResource ForegroundBrush}" FontWeight="Normal" Text="Body TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody TextBody Text"/>
<WrapPanel Name="DialogStackPanel" Orientation="Horizontal" HorizontalAlignment="Center"/>
</StackPanel>
</Border>
</Grid>
</Grid>
</Window>