-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
551 lines (551 loc) · 43 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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
<Window x:Class="DotNetPad.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:DotNetPad" Closing="Window_Closing"
SizeChanged="Window_SizeChanged" Name="AppWindow" MinWidth="750" MinHeight="600"
mc:Ignorable="d" WindowStyle="None" StateChanged="Window_StateChanged"
Title=".NETpad 3 for Windows 11" Width="1000" Height="625" >
<Window.Resources>
<RoutedUICommand x:Key="FindNextCommand" Text="FindNext">
<RoutedUICommand.InputGestures>
<KeyGesture>F3</KeyGesture>
</RoutedUICommand.InputGestures>
</RoutedUICommand>
<RoutedUICommand x:Key="FindPreviousCommand" Text="FindPrevious">
<RoutedUICommand.InputGestures>
<KeyGesture>Shift+F3</KeyGesture>
</RoutedUICommand.InputGestures>
</RoutedUICommand>
<RoutedUICommand x:Key="ReplaceCommand" Text="Replace">
<RoutedUICommand.InputGestures>
<KeyGesture>Ctrl+H</KeyGesture>
</RoutedUICommand.InputGestures>
</RoutedUICommand>
<RoutedUICommand x:Key="ReplaceAllCommand" Text="ReplaceAll">
<RoutedUICommand.InputGestures>
<KeyGesture>Ctrl+Shift+H</KeyGesture>
</RoutedUICommand.InputGestures>
</RoutedUICommand>
<RoutedUICommand x:Key="GoToCommand" Text="GoTo">
<RoutedUICommand.InputGestures>
<KeyGesture>Ctrl+G</KeyGesture>
</RoutedUICommand.InputGestures>
</RoutedUICommand>
<RoutedUICommand x:Key="TimeDateCommand" Text="TimeDate">
<RoutedUICommand.InputGestures>
<KeyGesture>F5</KeyGesture>
</RoutedUICommand.InputGestures>
</RoutedUICommand>
</Window.Resources>
<Window.CommandBindings>
<CommandBinding Command="New" Executed="NewCommand_Executed" />
<CommandBinding Command="Open" Executed="OpenCommand_Executed" />
<CommandBinding Command="Save" Executed="SaveCommand_Executed" />
<CommandBinding Command="SaveAs" Executed="SaveAsCommand_Executed" />
<CommandBinding Command="Print" Executed="PrintCommand_Executed" />
<CommandBinding Command="Close" Executed="CloseCommand_Executed" />
<CommandBinding Command="Delete" Executed="DeleteCommand_Executed" />
<CommandBinding Command="Find" Executed="FindCommand_Executed" />
<CommandBinding Command="{StaticResource FindNextCommand}" Executed="FindNextCommand_Executed" />
<CommandBinding Command="{StaticResource FindPreviousCommand}" Executed="FindPreviousCommand_Executed"/>
<CommandBinding Command="{StaticResource ReplaceCommand}" Executed="ReplaceCommand_Executed"/>
<CommandBinding Command="{StaticResource ReplaceAllCommand}" Executed="ReplaceAllCommand_Executed"/>
<CommandBinding Command="{StaticResource GoToCommand}" Executed="GoToCommand_Executed"/>
<CommandBinding Command="{StaticResource TimeDateCommand}" Executed="TimeDateCommand_Executed"/>
<CommandBinding Command="NavigationCommands.Zoom" Executed="ZoomCommand_Executed" />
</Window.CommandBindings>
<Window.InputBindings>
<KeyBinding Key="W" Modifiers="Ctrl" Command="Close" />
<KeyBinding Key="S" Modifiers="Ctrl + Shift" Command="SaveAs" />
<KeyBinding Key="OemPlus" Modifiers="Ctrl" Command="NavigationCommands.Zoom" CommandParameter="In" />
<KeyBinding Key="OemMinus" Modifiers="Ctrl" Command="NavigationCommands.Zoom" CommandParameter="Out" />
<KeyBinding Key="D0" Modifiers="Ctrl" Command="NavigationCommands.Zoom" CommandParameter="Restore" />
</Window.InputBindings>
<Grid Name="OuterGrid">
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Name="TabGrid" Background="Transparent" MouseLeftButtonDown="TopBorder_MouseLeftButtonDown" VerticalAlignment="Top" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="48" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button Name="BackButton" Grid.Column="0" FontFamily="Segoe Fluent Icons" Content="" FontSize="14" BorderThickness="0" Background="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,0,0,0" Click="BackButton_Click" Visibility="Collapsed" />
<Image Name="AppIcon" Grid.Column="1" Height="16" Width="16" VerticalAlignment="Center" HorizontalAlignment="Center" Source="/t-icon.png" MouseRightButtonUp="AppIcon_MouseRightButtonUp" />
<TextBlock Name="TitleText" Grid.Column="2" Text=".NETpad" HorizontalAlignment="Left" VerticalAlignment="Center" FontWeight="DemiBold" TextWrapping="NoWrap" MaxWidth="200" MinWidth="50" />
<ContentControl Grid.Column="3" MouseDoubleClick="MaximizeButton_Click">
<Separator Visibility="Visible" BorderThickness="0" />
</ContentControl>
<Button Name="MinimizeButton" Grid.Column="4" FontFamily="Segoe Fluent Icons" Content="" FontSize="12" Background="Transparent"
Click="MinimizeButton_Click" BorderThickness="0" Margin="0,0,5,0" VerticalAlignment="Top" />
<Button Name="MaximizeButton" Grid.Column="5" FontFamily="Segoe Fluent Icons" Content="" FontSize="12" Background="Transparent"
Click="MaximizeButton_Click" BorderThickness="0" Margin="0,0,5,0" VerticalAlignment="Top" />
<Button Name="CloseButton" Grid.Column="6" FontFamily="Segoe Fluent Icons" Content="" FontSize="14" Background="Transparent"
Click="CloseButton_Click" BorderThickness="0" Margin="0,0,5,0" VerticalAlignment="Top" MouseEnter="CloseButton_MouseEnter" MouseLeave="CloseButton_MouseLeave" />
</Grid>
<Grid Grid.Row="1" Name="OuterAppGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="0" />
</Grid.ColumnDefinitions>
<Grid Name="MainGrid" Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- For tabs UI ... Background="{DynamicResource SolidBackgroundFillColorTertiaryBrush}"-->
<Grid Grid.Row="0" Name="MenuGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Menu Grid.Column="0" FlowDirection="LeftToRight" HorizontalAlignment="Left" VerticalAlignment="Top"
HorizontalContentAlignment="Left"
BorderThickness="0" Padding="0,-2,0,0" Margin="0,0,0,0">
<MenuItem Header="_File" HorizontalAlignment="Left" WindowChrome.IsHitTestVisibleInChrome="False">
<MenuItem Command="New" Name="NewMenu" Header="_New">
<MenuItem.Icon>
<Image Source="/empty.png" Width="20" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Name="NewWindowMenu" Header="New _window" Click="NewWindowMenu_Click">
<MenuItem.Icon>
<Image Source="/empty.png" Width="20" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Command="Open" Name="OpenMenu" Header="_Open...">
<MenuItem.Icon>
<Image Source="/empty.png" Width="20" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Command="Save" Name="SaveMenu" Header="_Save">
<MenuItem.Icon>
<Image Source="/empty.png" Width="20" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Command="SaveAs" Name="SaveAsMenu" Header="Save _as..." InputGestureText="Ctrl+Shift+S" IsChecked="False">
<MenuItem.Icon>
<Image Source="/empty.png" Width="20" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Name="AutoSaveMenu" Header="Auto sa_ve" IsCheckable="True" IsChecked="False" Click="AutoSaveMenu_Click" />
<Separator />
<MenuItem Command="Print" Name="PrintMenu" Header="_Print">
<MenuItem.Icon>
<Image Source="/empty.png" Width="20" />
</MenuItem.Icon>
</MenuItem>
<Separator />
<MenuItem Command="Close" Name="ExitMenu" Header="E_xit" InputGestureText="Alt+F4">
<MenuItem.Icon>
<Image Source="/empty.png" Width="20" />
</MenuItem.Icon>
</MenuItem>
</MenuItem>
<MenuItem Header="_Edit" HorizontalAlignment="Left" WindowChrome.IsHitTestVisibleInChrome="False">
<MenuItem Command="Undo" Name="UndoMenu" Header="_Undo" />
<Separator />
<MenuItem Command="Cut" Name="CutMenu" Header="Cu_t" />
<MenuItem Command="Copy" Name="CopyMenu" Header="_Copy" />
<MenuItem Command="Paste" Name="PasteMenu" Header="_Paste" />
<MenuItem Command="Delete" Name="DeleteMenu" Header="De_lete" />
<Separator />
<MenuItem Command="Find" Name="FindMenu" Header="_Find" />
<MenuItem Command="{StaticResource FindNextCommand}" Name="FindNextMenu" Header="Find _next" />
<MenuItem Command="{StaticResource FindPreviousCommand}" Name="FindPreviousMenu" Header="Find pre_vious" />
<MenuItem Command="{StaticResource ReplaceCommand}" Name="ReplaceMenu" Header="_Replace" />
<MenuItem Command="{StaticResource ReplaceAllCommand}" Name="ReplaceAllMenu" Header="Replace a_ll" />
<MenuItem Command="{StaticResource GoToCommand}" Name="GoToMenu" Header="_Go to" />
<Separator />
<MenuItem Command="SelectAll" Name="SelectAllMenu" Header="Select _all" Click="SelectAllMenu_Click" />
<MenuItem Name="TimeDateMenu" Header="Time/_Date" InputGestureText="F5" />
<Separator />
<MenuItem Name="FontMenu" Header="_Font" Click="FontMenu_Click" />
</MenuItem>
<MenuItem Header="_View" HorizontalAlignment="Left" WindowChrome.IsHitTestVisibleInChrome="False">
<MenuItem Header="_Zoom">
<MenuItem.Icon>
<Image Source="/empty.png" Width="20" />
</MenuItem.Icon>
<MenuItem Command="NavigationCommands.Zoom" CommandParameter="In" Name="ZoomInMenu" Header="Zoom _in" InputGestureText="Ctrl+Plus" />
<MenuItem Command="NavigationCommands.Zoom" CommandParameter="Out" Name="ZoomOutMenu" Header="Zoom _out" InputGestureText="Ctrl+Minus" />
<MenuItem Command="NavigationCommands.Zoom" CommandParameter="Restore" Name="RestoreDefaultZoomMenu" Header="_Restore default zoom" InputGestureText="Ctrl+0" />
</MenuItem>
<MenuItem Name="StatusBarMenu" Header="_Status bar" IsCheckable="True" Click="StatusBarMenu_Click" />
<MenuItem Name="WordWrapMenu" Header="_Word wrap" IsCheckable="True" IsChecked="False" Click="WordWrapMenu_Click" />
</MenuItem>
</Menu>
<Separator Grid.Column="1" Visibility="Visible" BorderThickness="0"/>
<Menu Grid.Column="2" BorderThickness="0">
<MenuItem Name="SettingsButton" WindowChrome.IsHitTestVisibleInChrome="False" HorizontalAlignment="Right" FlowDirection="RightToLeft" ToolTip="Settings" ToolTipService.InitialShowDelay="500" Click="SettingsButton_Click">
<MenuItem.Header>
<TextBlock FontFamily="Segoe Fluent Icons" Text="" />
</MenuItem.Header>
</MenuItem>
</Menu>
</Grid>
<Grid Grid.Row="1" Name="FindReplaceGrid" HorizontalAlignment="Stretch" VerticalAlignment="Center"
Visibility="Collapsed" GotFocus="FindReplaceGrid_GotFocus">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderThickness="0,1,0,1"
BorderBrush="{DynamicResource ControlAltFillColorQuarternaryBrush}">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="10" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" MaxWidth="450" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="1*" MaxWidth="450" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox Grid.Column="0" Name="FindTextBox" Height="32" Margin="0,7,7,7" FontSize="12" />
<Button Grid.Column="1" Name="FindNextButton" Height="32" IsDefault="True" Click="FindNextButton_Click"
FontFamily="Segoe Fluent Icons" FontSize="12" Content=""
Margin="0,7,7,7" BorderThickness="0" Background="Transparent" />
<Button Grid.Column="2" Name="FindPreviousButton" Height="32" Click="FindPreviousButton_Click"
FontFamily="Segoe Fluent Icons" FontSize="12" Content=""
Margin="0,7,7,7" BorderThickness="0" Background="Transparent"/>
<TextBox Grid.Column="3" Name="ReplaceTextBox" Height="32" Margin="0,7,7,7" FontSize="12" Visibility="Collapsed" />
<Button Grid.Column="4" Name="ReplaceButton" Width="100" Height="32" Content="Replace"
Margin="0,7,7,7" FontSize="12" Visibility="Collapsed" Click="ReplaceButton_Click" />
<Button Grid.Column="6" Name="ReplaceAllButton" Width="100" Height="32" Content="Replace all"
Margin="0,7,7,7" FontSize="12" Visibility="Collapsed" Click="ReplaceAllButton_Click" />
</Grid>
<Button Grid.Column="2" Name="CloseFindReplaceButton" Height="32" IsCancel="True"
FontFamily="Segoe Fluent Icons" FontSize="10" Content=""
Margin="0,7,0,7" BorderThickness="0" Background="Transparent" Click="CloseFindReplaceButton_Click" />
</Grid>
</Border>
</Grid>
<TextBox Grid.Row="2" Name="TextBox1" AllowDrop="True" AcceptsReturn="True" TextWrapping="NoWrap"
BorderThickness="0" SpellCheck.IsEnabled="False" Style="{StaticResource Win11TextBox}"
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
TextChanged="TextBox1_TextChanged" />
<StatusBar Grid.Row="3" Name="StatusBar1" Padding="4" Background="Transparent">
<StatusBarItem>
<ScrollViewer MouseDoubleClick="AutoSaveMenu_Click" Focusable="False" IsTabStop="False" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled">
<TextBlock Width="100" Name="AutoSaveText" Text="Auto save: Off" Margin="5,0,10,0" ToolTip="Double-click to toggle Auto save" ToolTipService.InitialShowDelay="500" />
</ScrollViewer>
</StatusBarItem>
<StatusBarItem>
<TextBlock Width="100" Name="PositionText" Text="Ln 1, Col 1" Margin="5,0,10,0"/>
</StatusBarItem>
<StatusBarItem>
<TextBlock Width="75" Name="ZoomText" Text="100%" Margin="5,0,10,0" ToolTip="Ctrl + Plus to Zoom in, Ctrl + Minus to Zoom out, Ctrl + 0 to reset" ToolTipService.InitialShowDelay="500" />
</StatusBarItem>
<StatusBarItem>
<ScrollViewer MouseDoubleClick="Count_MouseDoubleClick" Focusable="False" IsTabStop="False" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled">
<TextBlock Width="100" Name="WordCountText" Text="0 words" Margin="5,0,10,0" ToolTip="Double-click to toggle word/character count" ToolTipService.InitialShowDelay="500" />
</ScrollViewer>
</StatusBarItem>
<StatusBarItem>
<TextBlock Text="" />
</StatusBarItem>
</StatusBar>
</Grid>
<ScrollViewer Grid.Column="1" Name="SettingsScrollViewer" VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto" Focusable="False">
<Grid Name="SettingsGrid" Visibility="Collapsed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Name="SettingsHeaderGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Settings" Style="{StaticResource TitleLargeTextBlockStyle}" Margin="50,40,0,10" HorizontalAlignment="Left" VerticalAlignment="Top" />
</Grid>
<Grid Name="MainSetingsGrid" Grid.Row="1" Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Row="1" Content="Appearance" Style="{StaticResource Win11Text}" Margin="50,10,20,10" HorizontalAlignment="Left" VerticalAlignment="Top" />
<Expander Grid.Row="2" Name="AppThemeExpander" Margin="50,0,50,0" IsExpanded="False" Focusable="False">
<Expander.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Style="{StaticResource Win11Text}" FontFamily="Segoe Fluent Icons" FontSize="16" Content="" Margin="10,10,10,10" />
<Grid Grid.Column="1" Margin="10,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="App theme" Style="{StaticResource Win11Text}" />
<Label Grid.Row="1" Content="Select which app theme to display" Padding="5,0,0,0" Style="{StaticResource Win11Text2}" />
</Grid>
</Grid>
</Expander.Header>
<Expander.Content>
<StackPanel>
<RadioButton Content="Light" Name="LightThemeRadio" GroupName="ThemeGroup" IsChecked="False" FontFamily="Segoe UI Variable" FontSize="14" Margin="60,0,0,0" Click="LightThemeRadioButton_Click" />
<RadioButton Content="Dark" Name="DarkThemeRadio" GroupName="ThemeGroup" IsChecked="False" FontFamily="Segoe UI Variable" FontSize="14" Margin="60,5,0,0" Click="DarkThemeRadioButton_Click" />
<RadioButton Content="Use system setting" Name="SystemThemeRadio" GroupName="ThemeGroup" IsChecked="True" FontFamily="Segoe UI Variable" FontSize="14" Margin="60,5,0,0" Click="SystemThemeRadioButton_Click" />
</StackPanel>
</Expander.Content>
</Expander>
<Label Grid.Row="3" Content="Text Formatting" Style="{StaticResource Win11Text}" Margin="50,10,20,10" HorizontalAlignment="Left" VerticalAlignment="Top" />
<Expander Grid.Row="4" Name="FontExpander" Margin="50,0,50,5" IsExpanded="False" Focusable="False">
<Expander.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Style="{StaticResource Win11Text}"
FontFamily="Segoe Fluent Icons" FontSize="16" Content=""
Margin="10,10,10,10" />
<Grid Grid.Column="1" Margin="10,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Style="{StaticResource Win11Text}" Content="Font" VerticalAlignment="Center" />
</Grid>
</Grid>
</Expander.Header>
<Expander.Content>
<StackPanel>
<Border BorderThickness="0,0,0,1" BorderBrush="{DynamicResource ControlAltFillColorQuarternaryBrush}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="Family" Style="{StaticResource Win11Text}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="50,5,0,5" />
<ComboBox Name="FontFamilyComboBox" Grid.Column="1" MinWidth="225" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,5,50,5" SelectedIndex="0" IsEditable="False" IsReadOnly="True"
ItemsSource="{x:Static Fonts.SystemFontFamilies}" Padding="10,5,5,5"
SelectionChanged="FontFamilyComboBox_SelectionChanged" />
</Grid>
</Border>
<Border BorderThickness="0,0,0,1" BorderBrush="{DynamicResource ControlAltFillColorQuarternaryBrush}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="Style" Style="{StaticResource Win11Text}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="50,5,0,5" />
<ComboBox Name="FontStyleComboBox" Grid.Column="1" MinWidth="225" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,5,50,5" SelectedIndex="0" IsEditable="False" IsReadOnly="True"
ItemsSource="{Binding}" Padding="10,5,5,5"
SelectionChanged="FontStyleComboBox_SelectionChanged" />
</Grid>
</Border>
<Border BorderThickness="0,0,0,1" BorderBrush="{DynamicResource ControlAltFillColorQuarternaryBrush}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="Size" Style="{StaticResource Win11Text}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="50,5,0,5" />
<ComboBox Name="FontSizeComboBox" Grid.Column="1" MinWidth="225" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,5,50,5" SelectedIndex="0" IsEditable="False" IsReadOnly="True"
ItemsSource="{Binding}" Padding="10,5,5,5"
SelectionChanged="FontSizeComboBox_SelectionChanged" />
</Grid>
</Border>
<Label Name="FontExampleLabel" Content="The sound of ocean waves calms my soul" Style="{StaticResource Win11Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Height="Auto" BorderThickness="0" Background="Transparent" Margin="0,30,0,20" />
</StackPanel>
</Expander.Content>
</Expander>
<Border Grid.Row="5" Height="70" Margin="50,0,50,0" CornerRadius="4" Background="{DynamicResource CardBackgroundFillColorDefaultBrush}" BorderBrush="{DynamicResource ControlAltFillColorTertiaryBrush}" BorderThickness="1">
<StackPanel Focusable="False">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" HorizontalAlignment="Left" Width="32"
Style="{StaticResource Win11Text}" FontFamily="Segoe Fluent Icons" FontSize="16" Content=""
Margin="20,20,10,10" VerticalAlignment="Top" />
<Grid Grid.Column="1" Margin="10,7,0,0" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Padding="0" Content="Word wrap" Style="{StaticResource Win11Text}"
VerticalAlignment="Center" HorizontalAlignment="Left"
Margin="0,5,0,0" />
<Label Grid.Row="1" Padding="0" Content="Fit text within window by default" Style="{StaticResource Win11Text2}"
VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,5,0,0" />
</Grid>
<ToggleButton Grid.Column="2" Content="Off" Name="WordWrapToggleButton"
Margin="10,17,10,0" IsChecked="False"
HorizontalAlignment="Left" VerticalAlignment="Top"
Click="WordWrapMenu_Click" />
</Grid>
</StackPanel>
</Border>
<!-- Add session state UI here -->
<Label Grid.Row="8" Content="Files" Style="{StaticResource Win11Text}" Margin="50,10,20,10" HorizontalAlignment="Left" VerticalAlignment="Top" />
<Border Grid.Row="9" Visibility="Collapsed" Height="70" Margin="50,0,50,0" CornerRadius="4" Background="{DynamicResource CardBackgroundFillColorDefaultBrush}" BorderBrush="{DynamicResource ControlAltFillColorTertiaryBrush}" BorderThickness="1">
<StackPanel Focusable="False">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" HorizontalAlignment="Left" Width="32"
Style="{StaticResource Win11Text}" FontFamily="Segoe Fluent Icons" FontSize="16" Content=""
Margin="20,20,10,10" VerticalAlignment="Top" />
<Grid Grid.Column="1" Margin="10,7,0,0" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Padding="0" Content="Opening files" Style="{StaticResource Win11Text}"
VerticalAlignment="Center" HorizontalAlignment="Left"
Margin="0,5,0,0" />
<Label Grid.Column="1" Margin="10,10,0,0" Padding="0" Content="Spell check"
Style="{StaticResource Win11Text}"
VerticalAlignment="Center" HorizontalAlignment="Left" />
</Grid>
<ComboBox Grid.Column="2" Margin="10,17,10,0" Padding="10,5,5,5"
HorizontalAlignment="Right" VerticalAlignment="Top"
SelectedIndex="0" IsEditable="False" IsReadOnly="True">
<ComboBoxItem Content="Open in a new tab" />
<ComboBoxItem Content="Open in a new window" />
</ComboBox>
</Grid>
</StackPanel>
</Border>
<Border Grid.Row="10" Height="70" Margin="50,0,50,0" CornerRadius="4" Background="{DynamicResource CardBackgroundFillColorDefaultBrush}" BorderBrush="{DynamicResource ControlAltFillColorTertiaryBrush}" BorderThickness="1">
<StackPanel Focusable="False">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" HorizontalAlignment="Left" Width="32"
Style="{StaticResource Win11Text}" FontFamily="Segoe Fluent Icons" FontSize="16" Content=""
Margin="20,20,10,10" VerticalAlignment="Top" />
<Grid Grid.Column="1" Margin="10,7,0,0" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Padding="0" Content="Auto save" Style="{StaticResource Win11Text}"
VerticalAlignment="Center" HorizontalAlignment="Left"
Margin="0,5,0,0" />
<Label Grid.Row="1" Padding="0" Content="Automatically save your document every 30 seconds" Style="{StaticResource Win11Text2}"
VerticalAlignment="Center" HorizontalAlignment="Left"
Margin="0,5,0,0" />
</Grid>
<ToggleButton Grid.Column="2" Content="Off" Name="AutoSaveToggleButton"
Margin="10,17,10,0" IsChecked="False" Click="AutoSaveMenu_Click"
HorizontalAlignment="Left" VerticalAlignment="Top" />
</Grid>
</StackPanel>
</Border>
<Label Grid.Row="11" Content="Spelling" Style="{StaticResource Win11Text}" Margin="50,10,20,10" HorizontalAlignment="Left" VerticalAlignment="Top" />
<Border Grid.Row="12" Height="70" Margin="50,0,50,0" CornerRadius="4" Background="{DynamicResource CardBackgroundFillColorDefaultBrush}" BorderBrush="{DynamicResource ControlAltFillColorTertiaryBrush}" BorderThickness="1">
<StackPanel Focusable="False">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" HorizontalAlignment="Left" Width="32"
Style="{StaticResource Win11Text}" FontFamily="Segoe Fluent Icons" FontSize="16" Content=""
Margin="20,20,10,10" VerticalAlignment="Top" />
<Label Grid.Column="1" Margin="10,10,0,0" Padding="0" Content="Spell check"
Style="{StaticResource Win11Text}"
VerticalAlignment="Center" HorizontalAlignment="Left" />
<ToggleButton Grid.Column="2" Name="SpellCheckToggleButton" Content="Off"
Margin="10,17,10,0" IsChecked="False"
HorizontalAlignment="Left" VerticalAlignment="Top" Click="SpellCheckToggleButton_Click" />
</Grid>
</StackPanel>
</Border>
<Border Grid.Row="13" Visibility="Collapsed" Height="70" Margin="50,5,50,0" CornerRadius="4" Background="{DynamicResource CardBackgroundFillColorDefaultBrush}" BorderBrush="{DynamicResource ControlAltFillColorTertiaryBrush}" BorderThickness="1">
<StackPanel Focusable="False">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" HorizontalAlignment="Left" Width="32"
Style="{StaticResource Win11Text}" FontFamily="Segoe Fluent Icons" FontSize="16" Content=""
Margin="20,20,10,10" VerticalAlignment="Top" />
<Grid Grid.Column="1" Margin="10,7,0,0" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Padding="0" Content="Autocorrect" Style="{StaticResource Win11Text}"
VerticalAlignment="Center" HorizontalAlignment="Left"
Margin="0,5,0,0" />
<Label Grid.Row="1" Padding="0" Content="Typos are automatically corrected when spell check is turned on" Style="{StaticResource Win11Text2}"
VerticalAlignment="Center" HorizontalAlignment="Left"
Margin="0,5,0,0" />
</Grid>
<ToggleButton Grid.Column="2" Name="AutocorrectButton" Content="On" Margin="10,17,10,0" IsChecked="False"
HorizontalAlignment="Left" VerticalAlignment="Top" />
</Grid>
</StackPanel>
</Border>
</Grid>
<Grid Name="AboutGrid" Grid.Row="1" Grid.Column="1" Width="300" HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="About this app" FontWeight="Bold" Style="{StaticResource Win11Text}" Margin="50,20,20,0" />
<Label Name="AppNameLabel" Grid.Row="1" Content="App name" Style="{StaticResource Win11Text}" Margin="50,0,0,0" />
<Label Name="VersionLabel" Grid.Row="2" Content="Version number" Style="{StaticResource Win11Text}" Margin="50,0,0,0" />
<Label Name="CopyrightLabel" Grid.Row="3" Content="Copyright" Style="{StaticResource Win11Text}" Margin="50,0,0,10" />
<Button Name="ResetButton" Grid.Row="4" Content="Reset settings" Margin="50,0,20,25" Click="ResetButton_Click" />
</Grid>
<Grid Name="SettingsSpacerGrid" Grid.Column="0" Grid.Row="2" Height="50">
</Grid>
</Grid>
</ScrollViewer>
</Grid>
</Grid>
</Window>