|
1 | 1 | <Window x:Class="SpectrumNet.MainWindow"
|
2 |
| - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 |
| - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 |
| - xmlns:sk="clr-namespace:SkiaSharp.Views.WPF;assembly=SkiaSharp.Views.WPF" |
5 |
| - xmlns:local="clr-namespace:SpectrumNet" |
6 |
| - xmlns:shell="clr-namespace:System.Windows.Shell;assembly=PresentationFramework" |
7 |
| - Title="Spectrum Analyser" |
8 |
| - Height="700" |
9 |
| - Width="1100" |
10 |
| - WindowStartupLocation="CenterScreen" |
11 |
| - Background="{DynamicResource WindowBackgroundBrush}" |
12 |
| - WindowStyle="None" |
13 |
| - ResizeMode="CanResize" |
14 |
| - StateChanged="OnStateChanged" |
15 |
| - MouseDoubleClick="OnWindowMouseDoubleClick"> |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:sk="clr-namespace:SkiaSharp.Views.WPF;assembly=SkiaSharp.Views.WPF" |
| 5 | + xmlns:local="clr-namespace:SpectrumNet" |
| 6 | + xmlns:shell="clr-namespace:System.Windows.Shell;assembly=PresentationFramework" |
| 7 | + Title="Spectrum Analyser" |
| 8 | + Height="600" |
| 9 | + Width="800" |
| 10 | + MinHeight="600" |
| 11 | + MinWidth="800" |
| 12 | + WindowStartupLocation="CenterScreen" |
| 13 | + Background="Transparent" |
| 14 | + AllowsTransparency="True" |
| 15 | + WindowStyle="None" |
| 16 | + ResizeMode="CanResize" |
| 17 | + StateChanged="OnStateChanged" |
| 18 | + MouseDoubleClick="OnWindowMouseDoubleClick"> |
16 | 19 |
|
17 | 20 | <Window.Resources>
|
18 | 21 | <Duration x:Key="StandardAnimationDuration">0:0:0.3</Duration>
|
19 | 22 | <CubicEase x:Key="StandardEaseOut" EasingMode="EaseOut"/>
|
20 | 23 | <CubicEase x:Key="StandardEaseIn" EasingMode="EaseIn"/>
|
21 | 24 |
|
22 |
| - <Storyboard x:Key="ShowControlPanelStoryboard"> |
23 |
| - <DoubleAnimation |
24 |
| - Storyboard.TargetName="spectrumCanvas" |
25 |
| - Storyboard.TargetProperty="Opacity" |
26 |
| - From="1" To="0.95" |
27 |
| - Duration="{StaticResource StandardAnimationDuration}" |
28 |
| - FillBehavior="Stop"> |
29 |
| - <DoubleAnimation.EasingFunction> |
30 |
| - <CubicEase EasingMode="EaseOut"/> |
31 |
| - </DoubleAnimation.EasingFunction> |
32 |
| - </DoubleAnimation> |
33 |
| - <DoubleAnimation |
34 |
| - Storyboard.TargetName="SpectrumScaleTransform" |
35 |
| - Storyboard.TargetProperty="ScaleY" |
36 |
| - From="1" To="0.95" |
37 |
| - Duration="{StaticResource StandardAnimationDuration}" |
38 |
| - FillBehavior="Stop"> |
39 |
| - <DoubleAnimation.EasingFunction> |
40 |
| - <CubicEase EasingMode="EaseOut"/> |
41 |
| - </DoubleAnimation.EasingFunction> |
42 |
| - </DoubleAnimation> |
43 |
| - </Storyboard> |
44 |
| - |
45 |
| - <Storyboard x:Key="HideControlPanelStoryboard"> |
46 |
| - <DoubleAnimation |
47 |
| - Storyboard.TargetName="spectrumCanvas" |
48 |
| - Storyboard.TargetProperty="Opacity" |
49 |
| - From="0.95" To="1" |
50 |
| - Duration="{StaticResource StandardAnimationDuration}" |
51 |
| - FillBehavior="Stop"> |
52 |
| - <DoubleAnimation.EasingFunction> |
53 |
| - <CubicEase EasingMode="EaseIn"/> |
54 |
| - </DoubleAnimation.EasingFunction> |
55 |
| - </DoubleAnimation> |
56 |
| - <DoubleAnimation |
57 |
| - Storyboard.TargetName="SpectrumScaleTransform" |
58 |
| - Storyboard.TargetProperty="ScaleY" |
59 |
| - From="0.95" To="1" |
60 |
| - Duration="{StaticResource StandardAnimationDuration}" |
61 |
| - FillBehavior="Stop"> |
62 |
| - <DoubleAnimation.EasingFunction> |
63 |
| - <CubicEase EasingMode="EaseIn"/> |
64 |
| - </DoubleAnimation.EasingFunction> |
65 |
| - </DoubleAnimation> |
66 |
| - </Storyboard> |
67 |
| - |
68 | 25 | <Storyboard x:Key="ShowPanelAnimation">
|
69 |
| - <DoubleAnimation |
70 |
| - Storyboard.TargetName="ControlPanel" |
71 |
| - Storyboard.TargetProperty="Opacity" |
72 |
| - From="0" To="1" |
73 |
| - Duration="{StaticResource StandardAnimationDuration}" |
74 |
| - FillBehavior="Stop"> |
| 26 | + <DoubleAnimation |
| 27 | + Storyboard.TargetName="ControlPanel" |
| 28 | + Storyboard.TargetProperty="Opacity" |
| 29 | + From="0" To="1" |
| 30 | + Duration="{StaticResource StandardAnimationDuration}" |
| 31 | + FillBehavior="HoldEnd"> |
75 | 32 | <DoubleAnimation.EasingFunction>
|
76 | 33 | <CubicEase EasingMode="EaseOut"/>
|
77 | 34 | </DoubleAnimation.EasingFunction>
|
78 | 35 | </DoubleAnimation>
|
79 |
| - <DoubleAnimation |
80 |
| - Storyboard.TargetName="ControlPanelTransform" |
81 |
| - Storyboard.TargetProperty="Y" |
82 |
| - From="20" To="0" |
83 |
| - Duration="{StaticResource StandardAnimationDuration}" |
84 |
| - FillBehavior="Stop"> |
| 36 | + <DoubleAnimation |
| 37 | + Storyboard.TargetName="ControlPanelTransform" |
| 38 | + Storyboard.TargetProperty="Y" |
| 39 | + From="20" To="0" |
| 40 | + Duration="{StaticResource StandardAnimationDuration}" |
| 41 | + FillBehavior="HoldEnd"> |
85 | 42 | <DoubleAnimation.EasingFunction>
|
86 | 43 | <CubicEase EasingMode="EaseOut"/>
|
87 | 44 | </DoubleAnimation.EasingFunction>
|
88 | 45 | </DoubleAnimation>
|
89 | 46 | </Storyboard>
|
90 | 47 |
|
91 | 48 | <Storyboard x:Key="HidePanelAnimation">
|
92 |
| - <DoubleAnimation |
93 |
| - Storyboard.TargetName="ControlPanel" |
94 |
| - Storyboard.TargetProperty="Opacity" |
95 |
| - From="1" To="0" |
96 |
| - Duration="{StaticResource StandardAnimationDuration}" |
97 |
| - FillBehavior="Stop"> |
| 49 | + <DoubleAnimation |
| 50 | + Storyboard.TargetName="ControlPanel" |
| 51 | + Storyboard.TargetProperty="Opacity" |
| 52 | + From="1" To="0" |
| 53 | + Duration="{StaticResource StandardAnimationDuration}" |
| 54 | + FillBehavior="HoldEnd"> |
98 | 55 | <DoubleAnimation.EasingFunction>
|
99 | 56 | <CubicEase EasingMode="EaseIn"/>
|
100 | 57 | </DoubleAnimation.EasingFunction>
|
101 | 58 | </DoubleAnimation>
|
102 |
| - <DoubleAnimation |
103 |
| - Storyboard.TargetName="ControlPanelTransform" |
104 |
| - Storyboard.TargetProperty="Y" |
105 |
| - From="0" To="20" |
106 |
| - Duration="{StaticResource StandardAnimationDuration}" |
107 |
| - FillBehavior="Stop"> |
| 59 | + <DoubleAnimation |
| 60 | + Storyboard.TargetName="ControlPanelTransform" |
| 61 | + Storyboard.TargetProperty="Y" |
| 62 | + From="0" To="20" |
| 63 | + Duration="{StaticResource StandardAnimationDuration}" |
| 64 | + FillBehavior="HoldEnd"> |
108 | 65 | <DoubleAnimation.EasingFunction>
|
109 | 66 | <CubicEase EasingMode="EaseIn"/>
|
110 | 67 | </DoubleAnimation.EasingFunction>
|
|
115 | 72 |
|
116 | 73 | <shell:WindowChrome.WindowChrome>
|
117 | 74 | <shell:WindowChrome CaptionHeight="0"
|
118 |
| - CornerRadius="12" |
| 75 | + CornerRadius="0" |
119 | 76 | GlassFrameThickness="0"
|
120 | 77 | ResizeBorderThickness="6"/>
|
121 | 78 | </shell:WindowChrome.WindowChrome>
|
122 | 79 |
|
123 | 80 | <Border BorderThickness="1"
|
124 | 81 | BorderBrush="{DynamicResource WindowBorderBrush}"
|
125 |
| - CornerRadius="12"> |
| 82 | + CornerRadius="12" |
| 83 | + Background="{DynamicResource WindowBackgroundBrush}"> |
| 84 | + |
126 | 85 | <Grid>
|
127 | 86 | <Grid.RowDefinitions>
|
128 | 87 | <RowDefinition Height="Auto"/>
|
|
214 | 173 | </Grid.RowDefinitions>
|
215 | 174 |
|
216 | 175 | <ToggleButton x:Name="ToggleControlPanelButton"
|
217 |
| - Grid.Row="0" |
218 |
| - Click="ToggleControlPanelButton_Click" |
219 |
| - Content="Control Panel" |
220 |
| - HorizontalAlignment="Stretch" |
221 |
| - Height="30" |
222 |
| - Style="{DynamicResource ControlPanelToggleButtonStyle}" |
223 |
| - BorderThickness="0" |
224 |
| - Margin="0,0,0,10"> |
| 176 | + Grid.Row="0" |
| 177 | + Click="ToggleControlPanelButton_Click" |
| 178 | + Content="Control Panel" |
| 179 | + HorizontalAlignment="Stretch" |
| 180 | + Height="30" |
| 181 | + Style="{DynamicResource ControlPanelToggleButtonStyle}" |
| 182 | + BorderThickness="0" |
| 183 | + Margin="0,0,0,10"> |
225 | 184 | <ToggleButton.RenderTransform>
|
226 | 185 | <TransformGroup>
|
227 | 186 | <ScaleTransform x:Name="ToggleButtonScale" ScaleX="1" ScaleY="1"/>
|
|
233 | 192 | <BeginStoryboard>
|
234 | 193 | <Storyboard>
|
235 | 194 | <DoubleAnimation Storyboard.TargetProperty="RenderTransform.(TransformGroup.Children)[0].ScaleX"
|
236 |
| - To="1.05" |
237 |
| - Duration="0:0:0.1" |
238 |
| - AutoReverse="True"/> |
| 195 | + To="1.02" |
| 196 | + Duration="0:0:0.08" |
| 197 | + AutoReverse="True"> |
| 198 | + <DoubleAnimation.EasingFunction> |
| 199 | + <CubicEase EasingMode="EaseOut"/> |
| 200 | + </DoubleAnimation.EasingFunction> |
| 201 | + </DoubleAnimation> |
239 | 202 | <DoubleAnimation Storyboard.TargetProperty="RenderTransform.(TransformGroup.Children)[0].ScaleY"
|
240 |
| - To="1.05" |
241 |
| - Duration="0:0:0.1" |
242 |
| - AutoReverse="True"/> |
| 203 | + To="1.02" |
| 204 | + Duration="0:0:0.08" |
| 205 | + AutoReverse="True"> |
| 206 | + <DoubleAnimation.EasingFunction> |
| 207 | + <CubicEase EasingMode="EaseOut"/> |
| 208 | + </DoubleAnimation.EasingFunction> |
| 209 | + </DoubleAnimation> |
243 | 210 | <DoubleAnimation Storyboard.TargetProperty="RenderTransform.(TransformGroup.Children)[1].X"
|
244 |
| - To="-5" |
245 |
| - Duration="0:0:0.1" |
246 |
| - AutoReverse="True"/> |
| 211 | + To="-2" |
| 212 | + Duration="0:0:0.08" |
| 213 | + AutoReverse="True"> |
| 214 | + <DoubleAnimation.EasingFunction> |
| 215 | + <CubicEase EasingMode="EaseOut"/> |
| 216 | + </DoubleAnimation.EasingFunction> |
| 217 | + </DoubleAnimation> |
247 | 218 | </Storyboard>
|
248 | 219 | </BeginStoryboard>
|
249 | 220 | </EventTrigger>
|
|
272 | 243 | <Button x:Name="StartCaptureButton"
|
273 | 244 | Click="OnButtonClick"
|
274 | 245 | IsEnabled="{Binding CanStartCapture}"
|
275 |
| - Width="180" |
| 246 | + Width="130" |
276 | 247 | Height="40"
|
277 | 248 | Margin="0,0,10,0"
|
278 | 249 | Style="{DynamicResource ModernButtonStyle}">
|
|
286 | 257 | <Button x:Name="StopCaptureButton"
|
287 | 258 | Click="OnButtonClick"
|
288 | 259 | IsEnabled="{Binding IsRecording}"
|
289 |
| - Width="180" |
| 260 | + Width="130" |
290 | 261 | Height="40"
|
291 | 262 | Margin="0,0,10,0"
|
292 | 263 | Style="{DynamicResource ModernButtonStyle}">
|
|
299 | 270 | </Button>
|
300 | 271 | <Button x:Name="OverlayButton"
|
301 | 272 | Click="OnButtonClick"
|
302 |
| - Width="180" |
| 273 | + Width="130" |
303 | 274 | Height="40"
|
304 | 275 | Margin="0,0,10,0"
|
305 | 276 | Style="{DynamicResource ModernButtonStyle}">
|
|
312 | 283 | </Button>
|
313 | 284 | <Button x:Name="OpenSettingsButton"
|
314 | 285 | Click="OnButtonClick"
|
315 |
| - Width="180" |
| 286 | + Width="130" |
316 | 287 | Height="40"
|
317 | 288 | Margin="0,0,10,0"
|
318 | 289 | Style="{DynamicResource ModernButtonStyle}">
|
|
325 | 296 | </Button>
|
326 | 297 | <Button x:Name="OpenPopupButton"
|
327 | 298 | Click="OnButtonClick"
|
328 |
| - Width="180" |
| 299 | + Width="130" |
329 | 300 | Height="40"
|
330 | 301 | Style="{DynamicResource ModernButtonStyle}">
|
331 | 302 | <StackPanel Orientation="Horizontal">
|
|
468 | 439 | Padding="24"
|
469 | 440 | Width="400"
|
470 | 441 | BorderBrush="{DynamicResource DarkPopupBorderBrush}"
|
471 |
| - BorderThickness="1"> |
| 442 | + BorderThickness="1" |
| 443 | + RenderTransformOrigin="0.5,0.5"> |
| 444 | + <Border.RenderTransform> |
| 445 | + <ScaleTransform ScaleX="0.7" ScaleY="0.7"/> |
| 446 | + </Border.RenderTransform> |
| 447 | + <Border.Triggers> |
| 448 | + <EventTrigger RoutedEvent="Loaded"> |
| 449 | + <BeginStoryboard> |
| 450 | + <Storyboard> |
| 451 | + <DoubleAnimation |
| 452 | + Storyboard.TargetProperty="Opacity" |
| 453 | + From="0" To="1" |
| 454 | + Duration="{StaticResource StandardAnimationDuration}" |
| 455 | + EasingFunction="{StaticResource StandardEaseOut}" /> |
| 456 | + <DoubleAnimation |
| 457 | + Storyboard.TargetProperty="RenderTransform.(ScaleTransform.ScaleX)" |
| 458 | + From="0.7" To="1" |
| 459 | + Duration="{StaticResource StandardAnimationDuration}" |
| 460 | + EasingFunction="{StaticResource StandardEaseOut}" /> |
| 461 | + <DoubleAnimation |
| 462 | + Storyboard.TargetProperty="RenderTransform.(ScaleTransform.ScaleY)" |
| 463 | + From="0.7" To="1" |
| 464 | + Duration="{StaticResource StandardAnimationDuration}" |
| 465 | + EasingFunction="{StaticResource StandardEaseOut}" /> |
| 466 | + </Storyboard> |
| 467 | + </BeginStoryboard> |
| 468 | + </EventTrigger> |
| 469 | + </Border.Triggers> |
472 | 470 | <StackPanel>
|
473 | 471 | <TextBlock Text="Gain Settings"
|
474 |
| - FontSize="20" |
475 |
| - FontWeight="Bold" |
476 |
| - Foreground="{DynamicResource LightTextPrimaryBrush}" |
477 |
| - Margin="0,0,0,20"/> |
| 472 | + FontSize="20" |
| 473 | + FontWeight="Bold" |
| 474 | + Foreground="{DynamicResource LightTextPrimaryBrush}" |
| 475 | + Margin="0,0,0,20"/> |
478 | 476 | <Grid Margin="0,0,0,16">
|
479 | 477 | <Grid.ColumnDefinitions>
|
480 | 478 | <ColumnDefinition Width="120"/>
|
|
0 commit comments