|
1 | | -<ui:FluentWindow x:Class="MainWindow" x:Name="MainWindow" |
| 1 | +<ui:FluentWindow x:Class="MainWindow" |
2 | 2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:bh="http://schemas.microsoft.com/xaml/behaviors" |
4 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
5 | 6 | xmlns:local="clr-namespace:CompactGUI" |
6 | 7 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
7 | | - xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" |
8 | 8 | xmlns:tray="http://schemas.lepo.co/wpfui/2022/xaml/tray" |
9 | | - Title="MainWindow" xmlns:bh="http://schemas.microsoft.com/xaml/behaviors" |
10 | | - Width="1300" Height="700" MinHeight="600" MinWidth="768" |
| 9 | + xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" |
| 10 | + x:Name="MainWindow" Title="MainWindow" |
| 11 | + Width="1300" Height="700" MinWidth="768" MinHeight="600" |
| 12 | + d:DataContext="{d:DesignInstance Type=local:MainWindowViewModel}" |
11 | 13 | ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}" |
12 | 14 | ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}" |
13 | | - ExtendsContentIntoTitleBar="True" |
| 15 | + ExtendsContentIntoTitleBar="True" |
14 | 16 | Foreground="{DynamicResource TextFillColorPrimaryBrush}" |
15 | | - RenderOptions.BitmapScalingMode="HighQuality" WindowBackdropType="Mica" |
| 17 | + RenderOptions.BitmapScalingMode="HighQuality" WindowBackdropType="Mica" |
16 | 18 | WindowCornerPreference="Round" WindowStartupLocation="CenterScreen" |
17 | | - d:DataContext="{d:DesignInstance Type=local:MainWindowViewModel}" |
18 | 19 | mc:Ignorable="d"> |
19 | 20 | <bh:Interaction.Triggers> |
20 | 21 |
|
21 | 22 | <bh:EventTrigger EventName="Closing"> |
22 | | - <bh:InvokeCommandAction Command="{Binding ClosingCommand}" PassEventArgsToCommand="True"/> |
| 23 | + <bh:InvokeCommandAction Command="{Binding ClosingCommand}" PassEventArgsToCommand="True" /> |
23 | 24 | </bh:EventTrigger> |
24 | 25 | </bh:Interaction.Triggers> |
25 | 26 | <Grid> |
|
33 | 34 |
|
34 | 35 |
|
35 | 36 |
|
36 | | - <ui:NavigationView Grid.Row="1" x:Name="NavigationView" |
| 37 | + <ui:NavigationView x:Name="NavigationView" |
| 38 | + Grid.Row="1" Transition="FadeIn" |
37 | 39 | IsBackButtonVisible="Collapsed" PaneDisplayMode="Top"> |
38 | | - <ui:NavigationView.MenuItems > |
| 40 | + <ui:NavigationView.MenuItems> |
39 | 41 |
|
40 | 42 |
|
41 | | - <ui:NavigationViewItem Content="Home" |
| 43 | + <ui:NavigationViewItem Content="Home" |
42 | 44 | Margin="15,2,15,10" |
43 | 45 | NavigationCacheMode="Required" |
44 | | - Tag="{Binding}" TargetPageType="{x:Type local:HomePage}"> |
| 46 | + Tag="{Binding}" |
| 47 | + TargetPageType="{x:Type local:HomePage}"> |
45 | 48 | <ui:NavigationViewItem.Icon> |
46 | 49 | <ui:SymbolIcon Symbol="Home24" /> |
47 | 50 | </ui:NavigationViewItem.Icon> |
|
51 | 54 | <ui:NavigationViewItem Content="Watcher" |
52 | 55 | Margin="15,2,15,10" |
53 | 56 | NavigationCacheMode="Required" |
54 | | - Tag="{Binding}" TargetPageType="{x:Type local:WatcherPage}"> |
| 57 | + Tag="{Binding}" |
| 58 | + TargetPageType="{x:Type local:WatcherPage}"> |
55 | 59 | <ui:NavigationViewItem.Icon> |
56 | 60 | <ui:SymbolIcon Filled="False" Symbol="Eye24" /> |
57 | 61 | </ui:NavigationViewItem.Icon> |
|
61 | 65 | </ui:NavigationView.MenuItems> |
62 | 66 |
|
63 | 67 | <ui:NavigationView.FooterMenuItems> |
64 | | - |
| 68 | + |
65 | 69 | <ui:NavigationViewItem Margin="-5,0,15,1" |
66 | | - NavigationCacheMode="Required" TargetPageType="{x:Type local:SettingsPage}" |
67 | | - Tag="{Binding}"> |
68 | | - <!--TargetPageType="{x:Type local:SettingsPage}"--> |
| 70 | + NavigationCacheMode="Required" |
| 71 | + Tag="{Binding}" |
| 72 | + TargetPageType="{x:Type local:SettingsPage}"> |
| 73 | + <!-- TargetPageType="{x:Type local:SettingsPage}" --> |
69 | 74 |
|
70 | 75 | <ui:SymbolIcon Margin="0,0,-3,0" |
71 | 76 | FontSize="16" Symbol="Settings48" /> |
|
84 | 89 | </ui:NavigationView> |
85 | 90 |
|
86 | 91 |
|
87 | | - <Grid x:Name="RootContentDialog" Margin="0" |
88 | | - Grid.Row="0" Grid.RowSpan="2" |
89 | | - ClipToBounds="True" Panel.ZIndex="-1"> |
| 92 | + <Grid x:Name="RootContentDialog" |
| 93 | + Grid.Row="0" Grid.RowSpan="2" |
| 94 | + Margin="0" Panel.ZIndex="-1" |
| 95 | + ClipToBounds="True"> |
90 | 96 |
|
91 | 97 | <Border> |
92 | 98 | <Border.Background> |
93 | | - <LinearGradientBrush StartPoint="0,0.5" EndPoint="0.2,1" Opacity="0.4"> |
94 | | - <GradientStop Color="#283e51" Offset="0"/> |
95 | | - <GradientStop Color="#2d425d" Offset="1"/> |
| 99 | + <LinearGradientBrush Opacity="0.4" StartPoint="0,0.5" EndPoint="0.2,1"> |
| 100 | + <GradientStop Offset="0" Color="#283e51" /> |
| 101 | + <GradientStop Offset="1" Color="#2d425d" /> |
96 | 102 | </LinearGradientBrush> |
97 | 103 | </Border.Background> |
98 | 104 | </Border> |
99 | | - <local:ImageControl x:Name="SteamBg" Height="{Binding ActualHeight, ElementName=MainWindow}" Stretch="UniformToFill" Opacity="1" Margin="-75" HorizontalAlignment="Center" VerticalAlignment="Center" ClipToBounds="True" NewSource="{Binding BackgroundImage}"> |
| 105 | + <local:ImageControl x:Name="SteamBg" |
| 106 | + Height="{Binding ActualHeight, ElementName=MainWindow}" |
| 107 | + Margin="-75" HorizontalAlignment="Center" VerticalAlignment="Center" |
| 108 | + ClipToBounds="True" |
| 109 | + NewSource="{Binding BackgroundImage}" |
| 110 | + Opacity="1" Stretch="UniformToFill"> |
100 | 111 |
|
101 | 112 | <local:ImageControl.RenderTransform> |
102 | 113 | <TransformGroup> |
|
105 | 116 |
|
106 | 117 | </local:ImageControl.RenderTransform> |
107 | 118 | <local:ImageControl.RenderTransformOrigin> |
108 | | - <Point X="0.5" Y="0.5"/> |
| 119 | + <Point X="0.5" Y="0.5" /> |
109 | 120 | </local:ImageControl.RenderTransformOrigin> |
110 | 121 | <local:ImageControl.Triggers> |
111 | 122 | <EventTrigger RoutedEvent="local:ImageControl.SourceChanged"> |
112 | 123 | <BeginStoryboard> |
113 | 124 | <Storyboard> |
114 | | - |
115 | | - <DoubleAnimation Storyboard.TargetProperty="(Image.Opacity)" From="0" To="0.6" Duration="0:0:2" > |
| 125 | + |
| 126 | + <DoubleAnimation Storyboard.TargetProperty="(Image.Opacity)" From="0" To="0.6" Duration="0:0:2"> |
116 | 127 | <DoubleAnimation.EasingFunction> |
117 | | - <QuadraticEase EasingMode="EaseInOut"/> |
| 128 | + <QuadraticEase EasingMode="EaseInOut" /> |
118 | 129 | </DoubleAnimation.EasingFunction> |
119 | 130 | </DoubleAnimation> |
120 | 131 | <DoubleAnimation Storyboard.TargetProperty="(Effect).Radius" From="100" To="12" Duration="0:0:5" /> |
121 | | - <DoubleAnimation Storyboard.TargetProperty="(RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" From="2" To="1.0" Duration="0:0:6"> |
| 132 | + <DoubleAnimation Storyboard.TargetProperty="(RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" |
| 133 | + From="2" To="1.0" Duration="0:0:6"> |
122 | 134 | <DoubleAnimation.EasingFunction> |
123 | | - <QuinticEase EasingMode="EaseOut"/> |
| 135 | + <QuinticEase EasingMode="EaseOut" /> |
124 | 136 | </DoubleAnimation.EasingFunction> |
125 | 137 | </DoubleAnimation> |
126 | | - <DoubleAnimation Storyboard.TargetProperty="(RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" From="1.2" To="1.00" Duration="0:0:8"> |
| 138 | + <DoubleAnimation Storyboard.TargetProperty="(RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" |
| 139 | + From="1.2" To="1.00" Duration="0:0:8"> |
127 | 140 | <DoubleAnimation.EasingFunction> |
128 | | - <QuinticEase EasingMode="EaseOut"/> |
| 141 | + <QuinticEase EasingMode="EaseOut" /> |
129 | 142 | </DoubleAnimation.EasingFunction> |
130 | 143 | </DoubleAnimation> |
131 | 144 |
|
|
148 | 161 |
|
149 | 162 |
|
150 | 163 | <local:ImageControl.Effect> |
151 | | - <BlurEffect Radius="0" RenderingBias="Quality" KernelType="Box" /> |
| 164 | + <BlurEffect KernelType="Box" Radius="0" RenderingBias="Quality" /> |
152 | 165 | </local:ImageControl.Effect> |
153 | 166 |
|
154 | 167 |
|
155 | 168 | </local:ImageControl> |
156 | 169 |
|
157 | | - <TextBlock x:Name="ProgTitle" Text="CompactGUI" Margin="20,14" FontSize="20" Visibility="Collapsed" d:Visibility="Visible" /> |
| 170 | + <TextBlock x:Name="ProgTitle" |
| 171 | + Text="CompactGUI" Foreground="#10FFFFFF" |
| 172 | + Margin="20,16" HorizontalAlignment="Left" |
| 173 | + d:Visibility="Visible" FontSize="14" Visibility="Collapsed"> |
| 174 | + <TextBlock.RenderTransform> |
| 175 | + <TranslateTransform x:Name="TransformL" Y="20" /> |
| 176 | + </TextBlock.RenderTransform> |
| 177 | + <TextBlock.Style> |
| 178 | + <Style TargetType="TextBlock"> |
| 179 | + <Setter Property="Opacity" Value="0" /> |
| 180 | + <Style.Triggers> |
| 181 | + <DataTrigger Binding="{Binding Visibility, RelativeSource={RelativeSource Self}}" Value="Visible"> |
| 182 | + <DataTrigger.EnterActions> |
| 183 | + <BeginStoryboard> |
| 184 | + <Storyboard> |
| 185 | + <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="0" /> |
| 186 | + <!-- Fade-in animation --> |
| 187 | + <DoubleAnimation BeginTime="0:0:0.5" |
| 188 | + Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:1.5" /> |
| 189 | + |
| 190 | + <!-- Move upwards animation --> |
| 191 | + <DoubleAnimation BeginTime="0:0:0.5" |
| 192 | + Storyboard.TargetProperty="(RenderTransform).(TranslateTransform.Y)" From="10" To="0" |
| 193 | + Duration="0:0:0.5"> |
| 194 | + <DoubleAnimation.EasingFunction> |
| 195 | + <CircleEase /> |
| 196 | + </DoubleAnimation.EasingFunction> |
| 197 | + </DoubleAnimation> |
| 198 | + </Storyboard> |
| 199 | + </BeginStoryboard> |
| 200 | + </DataTrigger.EnterActions> |
| 201 | + </DataTrigger> |
| 202 | + </Style.Triggers> |
| 203 | + </Style> |
| 204 | + </TextBlock.Style> |
| 205 | + </TextBlock> |
158 | 206 | </Grid> |
159 | | - <ui:SnackbarPresenter x:Name="RootSnackbar" MaxWidth="600" |
160 | | - Grid.Row="1" Grid.Column="0" /> |
161 | | - <tray:NotifyIcon Grid.Row="0" x:Name="NotifyIconTray" |
162 | | - FocusOnLeftClick="True" |
163 | | - MenuOnRightClick="True" |
164 | | - TooltipText="CompactGUI"> |
| 207 | + <ui:SnackbarPresenter x:Name="RootSnackbar" |
| 208 | + Grid.Row="1" Grid.Column="0" |
| 209 | + MaxWidth="600" /> |
| 210 | + <tray:NotifyIcon x:Name="NotifyIconTray" |
| 211 | + Grid.Row="0" |
| 212 | + FocusOnLeftClick="True" MenuOnRightClick="True" TooltipText="CompactGUI"> |
165 | 213 | <tray:NotifyIcon.Menu> |
166 | 214 | <ContextMenu x:Name="NotifyIconTrayMenu"> |
167 | | - <MenuItem Header="Open" Command="{Binding NotifyIconOpenCommand}"/> |
168 | | - <MenuItem Header="Exit" Command="{Binding NotifyIconExitCommand}"/> |
| 215 | + <MenuItem Command="{Binding NotifyIconOpenCommand}" Header="Open" /> |
| 216 | + <MenuItem Command="{Binding NotifyIconExitCommand}" Header="Exit" /> |
169 | 217 | </ContextMenu> |
170 | 218 | </tray:NotifyIcon.Menu> |
171 | 219 | </tray:NotifyIcon> |
|
0 commit comments