-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
951 lines (815 loc) · 46.2 KB
/
Copy pathMainWindow.xaml
File metadata and controls
951 lines (815 loc) · 46.2 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
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
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
<Window x:Class="DisplayDeck.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="DisplayDeck"
Height="980"
Width="1220"
MinHeight="840"
MinWidth="1080"
WindowStartupLocation="CenterScreen"
Background="#F4F7FB"
FontFamily="Segoe UI">
<Window.Resources>
<SolidColorBrush x:Key="PageBackground" Color="#F4F7FB"/>
<SolidColorBrush x:Key="CardBackground" Color="#FFFFFF"/>
<SolidColorBrush x:Key="CardBackgroundSoft" Color="#F8FAFC"/>
<SolidColorBrush x:Key="CardBorder" Color="#D8E1EC"/>
<SolidColorBrush x:Key="TextPrimary" Color="#0F172A"/>
<SolidColorBrush x:Key="TextSecondary" Color="#475569"/>
<SolidColorBrush x:Key="TextMuted" Color="#64748B"/>
<SolidColorBrush x:Key="AccentBlue" Color="#2563EB"/>
<SolidColorBrush x:Key="AccentBlueDark" Color="#1D4ED8"/>
<SolidColorBrush x:Key="AccentBlueSoft" Color="#DBEAFE"/>
<SolidColorBrush x:Key="AccentGreen" Color="#059669"/>
<SolidColorBrush x:Key="AccentGreenSoft" Color="#DCFCE7"/>
<SolidColorBrush x:Key="AccentAmber" Color="#D97706"/>
<SolidColorBrush x:Key="AccentAmberSoft" Color="#FEF3C7"/>
<SolidColorBrush x:Key="InputBackground" Color="#FFFFFF"/>
<Style TargetType="TextBlock">
<Setter Property="FontFamily" Value="Segoe UI"/>
</Style>
<Style TargetType="Button">
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="Foreground" Value="#0F172A"/>
<Setter Property="Background" Value="#FFFFFF"/>
<Setter Property="BorderBrush" Value="#CBD5E1"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="16,10"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="18"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="PrimarySaveButton" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Width" Value="160"/>
<Setter Property="Height" Value="46"/>
<Setter Property="Background" Value="#2563EB"/>
<Setter Property="BorderBrush" Value="#1D4ED8"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="15"/>
</Style>
<Style x:Key="BigSwitchButton" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="132"/>
<Setter Property="FontSize" Value="28"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background" Value="#2563EB"/>
<Setter Property="BorderBrush" Value="#1D4ED8"/>
</Style>
<Style TargetType="TextBox">
<Setter Property="Background" Value="{StaticResource InputBackground}"/>
<Setter Property="Foreground" Value="{StaticResource TextPrimary}"/>
<Setter Property="BorderBrush" Value="#CBD5E1"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="12,9"/>
<Setter Property="FontSize" Value="14"/>
</Style>
<Style TargetType="CheckBox">
<Setter Property="Foreground" Value="{StaticResource TextSecondary}"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style TargetType="ListBox">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Background" Value="Transparent"/>
</Style>
<Style TargetType="ListBoxItem">
<Setter Property="Padding" Value="0"/>
<Setter Property="Margin" Value="0,0,14,14"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border x:Name="ItemBorder"
Background="#F8FAFC"
BorderBrush="#D8E1EC"
BorderThickness="1"
CornerRadius="22"
Padding="18">
<ContentPresenter/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="ItemBorder" Property="Background" Value="#DBEAFE"/>
<Setter TargetName="ItemBorder" Property="BorderBrush" Value="#2563EB"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ItemBorder" Property="BorderBrush" Value="#93C5FD"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid Margin="34">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="22"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="22"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="22"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="22"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="22"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="22"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="22"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="22"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- HERO -->
<Border Grid.Row="0"
Background="{StaticResource CardBackground}"
BorderBrush="{StaticResource CardBorder}"
BorderThickness="1"
CornerRadius="28"
Padding="30">
<StackPanel>
<TextBlock Text="DisplayDeck"
Foreground="{StaticResource TextPrimary}"
FontSize="44"
FontWeight="Bold"/>
<TextBlock Text="Switch your PC between custom display profiles."
Foreground="{StaticResource TextSecondary}"
FontSize="18"
Margin="0,8,0,0"/>
<Border Background="{StaticResource AccentAmberSoft}"
BorderBrush="#F59E0B"
BorderThickness="1"
CornerRadius="18"
Padding="18"
Margin="0,24,0,0">
<StackPanel>
<TextBlock Text="Initial Setup Required"
Foreground="#92400E"
FontSize="20"
FontWeight="Bold"/>
<TextBlock Text="Before saving profiles, turn on and connect every display you want to use, including TVs. DisplayDeck only shows active displays during setup so inactive virtual or phantom displays stay hidden."
Foreground="#78350F"
FontSize="15"
TextWrapping="Wrap"
Margin="0,7,0,0"/>
</StackPanel>
</Border>
</StackPanel>
</Border>
<!-- PROFILE SWITCHER -->
<Border Grid.Row="2"
Background="{StaticResource CardBackground}"
BorderBrush="{StaticResource CardBorder}"
BorderThickness="1"
CornerRadius="28"
Padding="24">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="18"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="18"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0">
<StackPanel DockPanel.Dock="Left">
<TextBlock Text="Display Profiles"
Foreground="{StaticResource TextPrimary}"
FontSize="26"
FontWeight="Bold"/>
<TextBlock Text="Select a profile, edit its setup, then switch using the big button, tray menu, or hotkey."
Foreground="{StaticResource TextMuted}"
FontSize="14"
Margin="0,4,0,0"/>
</StackPanel>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Right"
DockPanel.Dock="Right">
<Button Content="Add Profile"
Width="130"
Height="42"
Margin="0,0,10,0"
Click="AddProfileButton_Click"/>
<Button Content="Delete"
Width="95"
Height="42"
Click="DeleteProfileButton_Click"/>
</StackPanel>
</DockPanel>
<ListBox Grid.Row="2"
x:Name="ProfilesListBox"
SelectionChanged="ProfilesListBox_SelectionChanged"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Width="255">
<TextBlock Text="{Binding Name}"
Foreground="{StaticResource TextPrimary}"
FontSize="18"
FontWeight="Bold"
TextWrapping="Wrap"/>
<TextBlock Text="{Binding PrimaryDisplayLabel, StringFormat=Primary: {0}}"
Foreground="{StaticResource TextMuted}"
FontSize="12"
TextWrapping="Wrap"
Margin="0,7,0,0"/>
<TextBlock Text="{Binding EnabledDisplaysLabel, StringFormat=Enabled: {0}}"
Foreground="{StaticResource TextSecondary}"
FontSize="12"
TextWrapping="Wrap"
Margin="0,5,0,0"/>
<Border Background="#FFFFFF"
BorderBrush="#CBD5E1"
BorderThickness="1"
CornerRadius="8"
Padding="10,6"
HorizontalAlignment="Left"
Margin="0,10,0,0">
<TextBlock Text="{Binding HotkeyDisplay, StringFormat=Hotkey: {0}}"
Foreground="{StaticResource AccentBlue}"
FontSize="13"
FontWeight="Bold"/>
</Border>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button Grid.Row="4"
x:Name="SwitchSelectedProfileButton"
Style="{StaticResource BigSwitchButton}"
Click="SwitchSelectedProfileButton_Click">
<StackPanel>
<TextBlock x:Name="SwitchSelectedProfileButtonTitle"
Text="Switch Selected Profile"
Foreground="White"
FontSize="31"
FontWeight="Bold"
HorizontalAlignment="Center"/>
<TextBlock x:Name="SwitchSelectedProfileButtonSubtitle"
Text="Applies the selected display layout"
Foreground="#DBEAFE"
FontSize="15"
HorizontalAlignment="Center"
Margin="0,8,0,0"/>
</StackPanel>
</Button>
</Grid>
</Border>
<!-- SWITCHING DELAY NOTICE -->
<Border Grid.Row="4"
Background="#EEF6FF"
BorderBrush="#BFDBFE"
BorderThickness="1"
CornerRadius="22"
Padding="18">
<StackPanel>
<TextBlock Text="Display switching can take a moment"
Foreground="#1E3A8A"
FontSize="18"
FontWeight="Bold"/>
<TextBlock Text="When changing profiles, your screens may flicker, go black, move around, or take a few seconds to settle while Windows applies the new monitor layout."
Foreground="#1E40AF"
FontSize="14.5"
TextWrapping="Wrap"
Margin="0,6,0,0"/>
</StackPanel>
</Border>
<!-- SELECTED PROFILE + HOTKEY EDITOR -->
<Border Grid.Row="6"
Background="{StaticResource CardBackground}"
BorderBrush="{StaticResource CardBorder}"
BorderThickness="1"
CornerRadius="26"
Padding="24">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="220"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="18"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="18"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="18"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="20"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.ColumnSpan="2">
<TextBlock Text="Selected Profile"
Foreground="{StaticResource TextPrimary}"
FontSize="24"
FontWeight="Bold"/>
<TextBlock Text="Rename the selected profile and set its shortcut keys."
Foreground="{StaticResource TextMuted}"
FontSize="14"
Margin="0,4,0,0"/>
</StackPanel>
<TextBlock Grid.Row="2"
Grid.Column="0"
Text="Profile name"
Foreground="{StaticResource TextSecondary}"
VerticalAlignment="Center"/>
<TextBox Grid.Row="2"
Grid.Column="1"
x:Name="SelectedProfileNameBox"/>
<TextBlock Grid.Row="4"
Grid.Column="0"
Text="Current hotkey"
Foreground="{StaticResource TextSecondary}"
VerticalAlignment="Center"/>
<Border Grid.Row="4"
Grid.Column="1"
Background="#F8FAFC"
BorderBrush="#D8E1EC"
BorderThickness="1"
CornerRadius="12"
Padding="14,9"
HorizontalAlignment="Left">
<TextBlock x:Name="SelectedProfileHotkeyDisplayText"
Text="No hotkey set"
Foreground="{StaticResource AccentBlue}"
FontSize="22"
FontWeight="Bold"/>
</Border>
<TextBlock Grid.Row="6"
Grid.Column="0"
Text="Edit hotkey"
Foreground="{StaticResource TextSecondary}"
VerticalAlignment="Center"/>
<Border Grid.Row="6"
Grid.Column="1"
Background="#F8FAFC"
BorderBrush="#D8E1EC"
BorderThickness="1"
CornerRadius="18"
Padding="18">
<StackPanel>
<TextBlock Text="Tick modifiers, then type the key"
Foreground="{StaticResource TextPrimary}"
FontSize="16"
FontWeight="Bold"/>
<StackPanel Orientation="Horizontal"
Margin="0,14,0,0">
<CheckBox x:Name="HotkeyCtrlCheckBox"
Content="Ctrl"
Margin="0,0,14,0"/>
<CheckBox x:Name="HotkeyAltCheckBox"
Content="Alt"
Margin="0,0,14,0"/>
<CheckBox x:Name="HotkeyShiftCheckBox"
Content="Shift"
Margin="0,0,14,0"/>
<CheckBox x:Name="HotkeyWinCheckBox"
Content="Win"
Margin="0,0,20,0"/>
<TextBlock Text="Key:"
Foreground="{StaticResource TextSecondary}"
VerticalAlignment="Center"
Margin="0,0,8,0"/>
<TextBox x:Name="HotkeyKeyBox"
Width="84"
HorizontalContentAlignment="Center"
FontWeight="Bold"/>
</StackPanel>
<TextBlock Text="Example: Ctrl + Alt + D = tick Ctrl and Alt, then type D."
Foreground="{StaticResource TextMuted}"
FontSize="13"
TextWrapping="Wrap"
Margin="0,12,0,0"/>
</StackPanel>
</Border>
<StackPanel Grid.Row="8"
Grid.Column="1"
Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Content="Save Profile"
Style="{StaticResource PrimarySaveButton}"
Click="SaveSettingsButton_Click"/>
</StackPanel>
</Grid>
</Border>
<!-- DETECTED DISPLAYS -->
<Border Grid.Row="8"
Background="{StaticResource CardBackground}"
BorderBrush="{StaticResource CardBorder}"
BorderThickness="1"
CornerRadius="26"
Padding="24">
<StackPanel>
<DockPanel>
<StackPanel DockPanel.Dock="Left">
<TextBlock Text="Detected Active Displays"
Foreground="{StaticResource TextPrimary}"
FontSize="24"
FontWeight="Bold"/>
<TextBlock Text="Only currently active displays are shown."
Foreground="{StaticResource TextMuted}"
FontSize="14"
Margin="0,4,0,0"/>
</StackPanel>
<Button Content="Refresh"
Width="110"
Height="40"
HorizontalAlignment="Right"
DockPanel.Dock="Right"
Click="RefreshDisplaysButton_Click"/>
</DockPanel>
<ItemsControl x:Name="DisplaysDataGrid"
Margin="0,18,0,0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Width="340"
Background="#F8FAFC"
BorderBrush="#D8E1EC"
BorderThickness="1"
CornerRadius="22"
Padding="18"
Margin="0,0,16,16">
<StackPanel>
<TextBlock Text="{Binding DisplayLabel}"
Foreground="{StaticResource TextPrimary}"
FontSize="18"
FontWeight="Bold"
TextWrapping="Wrap"/>
<TextBlock Text="{Binding DisplayName}"
Foreground="{StaticResource TextMuted}"
FontSize="13"
Margin="0,5,0,0"/>
<Border Background="#E0F2FE"
CornerRadius="8"
Padding="10,5"
HorizontalAlignment="Left"
Margin="0,12,0,0">
<TextBlock Text="{Binding ResolutionDisplayText}"
Foreground="#075985"
FontSize="13"
FontWeight="SemiBold"/>
</Border>
<StackPanel Orientation="Horizontal"
Margin="0,14,0,0">
<Border Background="{StaticResource AccentGreenSoft}"
CornerRadius="8"
Padding="10,5"
Margin="0,0,8,0">
<TextBlock Text="{Binding ActiveText}"
Foreground="{StaticResource AccentGreen}"
FontSize="12"
FontWeight="Bold"/>
</Border>
<Border Background="#E2E8F0"
CornerRadius="8"
Padding="10,5">
<TextBlock Text="{Binding PrimaryText, StringFormat=Primary: {0}}"
Foreground="#334155"
FontSize="12"
FontWeight="Bold"/>
</Border>
</StackPanel>
<TextBlock Text="{Binding PositionText, StringFormat=Position: {0}}"
Foreground="{StaticResource TextMuted}"
FontSize="12"
Margin="0,12,0,0"/>
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Border>
<!-- DISPLAY NAME OVERRIDES -->
<Border Grid.Row="10"
Background="{StaticResource CardBackground}"
BorderBrush="{StaticResource CardBorder}"
BorderThickness="1"
CornerRadius="26"
Padding="24">
<StackPanel>
<DockPanel>
<StackPanel DockPanel.Dock="Left">
<TextBlock Text="Display Name Overrides"
Foreground="{StaticResource TextPrimary}"
FontSize="24"
FontWeight="Bold"/>
<TextBlock Text="Rename displays here if Windows reports the wrong monitor name. These names are saved and used on profile cards, setup rows, and disconnected displays."
Foreground="{StaticResource TextMuted}"
FontSize="14"
TextWrapping="Wrap"
Margin="0,4,0,0"/>
</StackPanel>
<StackPanel DockPanel.Dock="Right"
Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Content="Reset Names"
Width="120"
Height="40"
Margin="0,0,10,0"
Click="ResetDisplayNamesButton_Click"/>
<Button Content="Save Names"
Width="120"
Height="40"
Background="#2563EB"
BorderBrush="#1D4ED8"
Foreground="White"
Click="SaveDisplayNamesButton_Click"/>
</StackPanel>
</DockPanel>
<ItemsControl x:Name="DisplayAliasesItemsControl"
Margin="0,18,0,0">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Background="#F8FAFC"
BorderBrush="#D8E1EC"
BorderThickness="1"
CornerRadius="18"
Padding="16"
Margin="0,0,0,12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="260"/>
<ColumnDefinition Width="260"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<TextBlock Text="{Binding DisplayName}"
Foreground="{StaticResource TextPrimary}"
FontSize="15"
FontWeight="Bold"/>
<TextBlock Text="{Binding ResolutionText}"
Foreground="{StaticResource TextMuted}"
FontSize="12"
Margin="0,5,0,0"/>
<TextBlock Text="{Binding PositionText, StringFormat=Position: {0}}"
Foreground="{StaticResource TextMuted}"
FontSize="12"
Margin="0,3,0,0"/>
</StackPanel>
<StackPanel Grid.Column="1">
<TextBlock Text="Detected name"
Foreground="{StaticResource TextMuted}"
FontSize="12"/>
<TextBlock Text="{Binding DetectedName}"
Foreground="{StaticResource TextSecondary}"
FontSize="14"
FontWeight="SemiBold"
TextWrapping="Wrap"
Margin="0,7,0,0"/>
</StackPanel>
<StackPanel Grid.Column="2">
<TextBlock Text="Display name to use"
Foreground="{StaticResource TextMuted}"
FontSize="12"/>
<TextBox Text="{Binding Alias, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Margin="0,7,0,0"/>
</StackPanel>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Border>
<!-- PROFILE DISPLAY BUILDER -->
<Border Grid.Row="12"
Background="{StaticResource CardBackground}"
BorderBrush="{StaticResource CardBorder}"
BorderThickness="1"
CornerRadius="26"
Padding="24">
<StackPanel>
<TextBlock Text="Profile Display Setup"
Foreground="{StaticResource TextPrimary}"
FontSize="24"
FontWeight="Bold"/>
<StackPanel Margin="0,4,0,0">
<TextBlock Text="Choose which displays are enabled and which one is primary for the selected profile."
Foreground="{StaticResource TextMuted}"
FontSize="14"/>
<Border Background="#DBEAFE"
BorderBrush="#93C5FD"
BorderThickness="1"
CornerRadius="12"
Padding="12,7"
HorizontalAlignment="Left"
Margin="0,12,0,0">
<TextBlock x:Name="ProfileDisplaySetupEditingText"
Text="Currently editing: Selected Profile"
Foreground="#1E3A8A"
FontSize="15"
FontWeight="Bold"/>
</Border>
</StackPanel>
<Border Background="#F8FAFC"
BorderBrush="#D8E1EC"
BorderThickness="1"
CornerRadius="18"
Padding="16"
Margin="0,18,0,18">
<TextBlock Text="Tip: Each profile needs at least one enabled display, and its primary display must also be enabled. Saved displays can still appear here even when they are not currently active."
Foreground="{StaticResource TextSecondary}"
FontSize="14"
TextWrapping="Wrap"/>
</Border>
<ItemsControl x:Name="ProfileDisplaysItemsControl">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Background="#F8FAFC"
BorderBrush="#D8E1EC"
BorderThickness="1"
CornerRadius="20"
Padding="16"
Margin="0,0,0,12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="260"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<TextBlock Text="{Binding MonitorName}"
Foreground="{StaticResource TextPrimary}"
FontSize="17"
FontWeight="Bold"
TextWrapping="Wrap"/>
<TextBlock Text="{Binding DisplayName}"
Foreground="{StaticResource TextMuted}"
FontSize="12"
Margin="0,4,0,0"/>
<StackPanel Orientation="Horizontal"
Margin="0,10,0,0">
<Border Background="#E0F2FE"
CornerRadius="8"
Padding="10,5"
HorizontalAlignment="Left"
Margin="0,0,8,0">
<TextBlock Text="{Binding ResolutionText}"
Foreground="#075985"
FontSize="13"
FontWeight="SemiBold"/>
</Border>
<Border Background="#F1F5F9"
CornerRadius="8"
Padding="10,5"
HorizontalAlignment="Left">
<TextBlock Text="{Binding ActiveStateText}"
Foreground="#334155"
FontSize="13"
FontWeight="SemiBold"/>
</Border>
</StackPanel>
<TextBlock Text="{Binding PositionText, StringFormat=Position: {0}}"
Foreground="{StaticResource TextMuted}"
FontSize="12"
Margin="0,10,0,0"/>
</StackPanel>
<StackPanel Grid.Column="1"
Orientation="Horizontal"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<CheckBox Content="Enabled"
IsChecked="{Binding Enabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Margin="0,0,20,0"/>
<CheckBox Content="Primary"
IsChecked="{Binding Primary, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Checked="PrimaryDisplayCheckBox_Checked"/>
</StackPanel>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Border>
<!-- PROFILE SETTINGS -->
<Border Grid.Row="14"
Background="{StaticResource CardBackground}"
BorderBrush="{StaticResource CardBorder}"
BorderThickness="1"
CornerRadius="26"
Padding="24">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="220"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="18"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="14"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="20"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="20"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.ColumnSpan="3">
<TextBlock Text="Launcher and Startup Settings"
Foreground="{StaticResource TextPrimary}"
FontSize="24"
FontWeight="Bold"/>
<TextBlock Text="Set optional launcher actions for the selected profile."
Foreground="{StaticResource TextMuted}"
FontSize="14"
Margin="0,4,0,0"/>
</StackPanel>
<TextBlock Grid.Row="2"
Grid.Column="0"
Text="Launcher app"
Foreground="{StaticResource TextSecondary}"
VerticalAlignment="Center"/>
<TextBox Grid.Row="2"
Grid.Column="1"
x:Name="LauncherPathBox"/>
<Button Grid.Row="2"
Grid.Column="2"
Content="Browse"
Margin="10,0,0,0"
Click="BrowseLauncher_Click"/>
<TextBlock Grid.Row="4"
Grid.Column="0"
Text="Launcher process"
Foreground="{StaticResource TextSecondary}"
VerticalAlignment="Center"/>
<TextBox Grid.Row="4"
Grid.Column="1"
Grid.ColumnSpan="2"
x:Name="LauncherProcessNameBox"/>
<StackPanel Grid.Row="6"
Grid.Column="1"
Grid.ColumnSpan="2"
Orientation="Horizontal"
HorizontalAlignment="Right">
<CheckBox x:Name="LaunchAppAfterSwitchCheckBox"
Content="Launch app after switching"
Margin="0,0,20,0"/>
<CheckBox x:Name="CloseLauncherAfterSwitchCheckBox"
Content="Close launcher after switching"
Margin="0,0,20,0"/>
<CheckBox x:Name="StartWithWindowsCheckBox"
Content="Start with Windows"
Margin="0,0,20,0"/>
<Button Content="Save Profile"
Style="{StaticResource PrimarySaveButton}"
Click="SaveSettingsButton_Click"/>
</StackPanel>
<TextBlock Grid.Row="8"
Grid.Column="1"
Grid.ColumnSpan="2"
Foreground="{StaticResource TextMuted}"
FontSize="13"
TextWrapping="Wrap"
Text="Launcher actions are per-profile. For example, a TV profile can launch a gaming app, while a Desk profile can close it."/>
</Grid>
</Border>
<!-- STATUS -->
<Border Grid.Row="16"
Background="{StaticResource CardBackground}"
BorderBrush="{StaticResource CardBorder}"
BorderThickness="1"
CornerRadius="22"
Padding="20">
<StackPanel>
<TextBlock Text="Status"
Foreground="{StaticResource TextPrimary}"
FontSize="20"
FontWeight="Bold"/>
<TextBlock x:Name="StatusTextBlock"
Text="Ready."
Foreground="{StaticResource TextSecondary}"
FontSize="14"
TextWrapping="Wrap"
Margin="0,8,0,0"/>
</StackPanel>
</Border>
</Grid>
</ScrollViewer>
</Window>