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
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:editors="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete"
xmlns:actions="clr-namespace:Tango.FSE.Common.EventTriggerActions"
xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:commonControls="clr-namespace:Tango.FSE.Common.Controls"
xmlns:wpf="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:local="clr-namespace:Tango.FSE.Common.Resources">
<Style x:Key="FSE_FlatButton_OpacityHover" TargetType="Button" BasedOn="{StaticResource MaterialDesignToolForegroundButton}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value="0.6"></Setter>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="FSE_FlatButton_ForegroundAccentHover" TargetType="Button" BasedOn="{StaticResource MaterialDesignToolForegroundButton}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryAccentBrush}"></Setter>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="FSE_RaisedButton_Dark_Hover" TargetType="Button" BasedOn="{StaticResource MaterialDesignRaisedLightButton}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Height" Value="Auto"></Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLighterBrush}"></Setter>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="FSE_RaisedButton_Dark_Hover_Accent_Foreground" TargetType="Button" BasedOn="{StaticResource MaterialDesignRaisedLightButton}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Height" Value="Auto"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryAccentDarkBrush}"></Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLighterBrush}"></Setter>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="FSE_Button_Red" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Background" Value="{StaticResource FSE_RedBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource FSE_RedBrush}"></Setter>
</Style>
<Style x:Key="FSE_Button_Green" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Background" Value="{StaticResource FSE_GreenBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource FSE_GreenBrush}"></Setter>
</Style>
<Style x:Key="FSE_Button_Orange" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Background" Value="{StaticResource FSE_OrangeBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource FSE_OrangeBrush}"></Setter>
</Style>
<Style x:Key="FSE_Button_Polygon" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource FSE_BorderBrush}"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="FontSize" Value="{StaticResource FSE_SmallFontSize}"></Setter>
<Setter Property="Height" Value="30"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryAccentBrush}"></Setter>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{StaticResource FSE_PrimaryAccentBrush}"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource FSE_PrimaryAccentBrush}"></Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{StaticResource FSE_BorderBrush}"></Setter>
</Trigger>
</ControlTemplate.Triggers>
<Grid TextElement.Foreground="{TemplateBinding Foreground}">
<Viewbox Stretch="Fill">
<Polygon Points="0,15 15,0 285,0 300,15 285,30 15,30" Fill="{TemplateBinding Background}" Height="30" Stroke="{TemplateBinding BorderBrush}"/>
</Viewbox>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
<Canvas IsHitTestVisible="False" HorizontalAlignment="Center">
<Grid Width="{Binding RelativeSource={RelativeSource AncestorType=Canvas},Path=ActualHeight}" Height="{Binding RelativeSource={RelativeSource AncestorType=Canvas},Path=ActualHeight}">
<Ellipse x:Name="ellipse" Fill="White" RenderTransformOrigin="0.5,0.5">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Setter Property="Opacity" Value="0.2"></Setter>
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="0" ScaleY="0" />
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Button},Path=IsPressed}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="0" To="10" Duration="00:00:0.5" DecelerationRatio="0.8" />
<DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="10" Duration="00:00:0.5" DecelerationRatio="0.8" />
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.2" To="0.001" Duration="00:00:0.5" DecelerationRatio="0.8" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
</Grid>
</Canvas>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FSE_CircularProgressBar" TargetType="ProgressBar" BasedOn="{StaticResource MaterialDesignCircularProgressBar}">
</Style>
<Style TargetType="editors:AutoCompleteTextBox" >
<Setter Property="Focusable" Value="True" />
<Setter Property="BorderThickness" Value="0 0 0 1"/>
<Setter Property="BorderBrush" Value="{DynamicResource MaterialDesignTextBoxBorder}" />
<Setter Property="Background" Value="Transparent"/>
<!--<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>-->
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Top"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="AllowDrop" Value="true"/>
<Setter Property="FontSize" Value="{StaticResource FSE_LargerFontSize}"></Setter>
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Validation.ErrorTemplate" Value="{DynamicResource MaterialDesignValidationErrorTemplate}"/>
<Setter Property="SelectedItemTemplate">
<Setter.Value>
<DataTemplate>
<TextBox IsReadOnly="True" Focusable="False" IsHitTestVisible="False" Text="{Binding ElementName=PART_Editor,Path=Text}"></TextBox>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="Icon">
<Setter.Value>
<material:PackIcon Kind="Search" Margin="0 0 5 0" Height="20" Width="20" VerticalAlignment="Center" />
</Setter.Value>
</Setter>
<Setter Property="LoadingContent">
<Setter.Value>
<ProgressBar IsIndeterminate="True" HorizontalAlignment="Stretch" Height="5" />
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type editors:AutoCompleteTextBox}">
<Grid>
<DockPanel>
<ContentPresenter ContentSource="Icon"
x:Name="PART_Icon"
Visibility="{TemplateBinding IconVisibility}" />
<Grid>
<TextBlock x:Name="PART_Watermark"
Text="{TemplateBinding Watermark}"
Visibility="Collapsed"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Focusable="False"
Foreground="Gray"
Margin="3,0" />
<TextBox x:Name="PART_Editor"
Focusable="True"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Style="{StaticResource ResourceKey=MaterialDesignTextBox}"
MaxLength="{Binding Path=MaxLength, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}"
CharacterCasing="{Binding Path=CharacterCasing, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}"
Text="{Binding Path=Text, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="GotKeyboardFocus">
<actions:SetterAction TargetObject="{Binding ElementName=PART_SelectedContent}" PropertyName="Visibility" Value="Collapsed" />
<actions:SetterAction PropertyName="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}" />
</i:EventTrigger>
<!--<i:EventTrigger EventName="LostKeyboardFocus">
<actions:SetterAction TargetObject="{Binding ElementName=PART_SelectedContent}" PropertyName="Visibility" Value="Visible" />
<actions:SetterAction PropertyName="Foreground" Value="Transparent" />
</i:EventTrigger>-->
</i:Interaction.Triggers>
</TextBox>
<ContentControl x:Name="PART_SelectedContent" IsHitTestVisible="False" Content="{TemplateBinding SelectedItem}" ContentTemplate="{TemplateBinding SelectedItemTemplate}">
<ContentControl.Style>
<Style TargetType="ContentControl">
<Setter Property="Visibility" Value="Collapsed"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=editors:AutoCompleteTextBox},Path=SelectedItem,Converter={StaticResource NullObjectToBooleanConverter}}" Value="True" >
<Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
</ContentControl>
</Grid>
</DockPanel>
<Popup x:Name="PART_Popup"
IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource Mode=TemplatedParent},Mode=TwoWay}"
Width="{TemplateBinding ActualWidth}"
HorizontalOffset="0"
MinHeight="25"
MaxHeight="600"
AllowsTransparency="True"
PopupAnimation="Slide"
Focusable="False">
<Border Margin="5" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" x:Name="PopupBorder"
BorderThickness="1"
BorderBrush="{DynamicResource AutoCompleteTextBox.Popup.BorderBrush}"
CornerRadius="5"
Padding="2">
<Border.Effect>
<DropShadowEffect/>
</Border.Effect>
<Grid>
<ListBox x:Name="PART_Selector"
ItemTemplate="{TemplateBinding ItemTemplate}"
ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}"
DisplayMemberPath="{TemplateBinding DisplayMember}"
Focusable="False"
BorderThickness="0"
MaxHeight="{Binding Path=MaxPopupHeight, RelativeSource={RelativeSource Mode=TemplatedParent},Mode=TwoWay}"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
>
</ListBox>
<Border Visibility="{Binding Path=IsLoading, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource ResourceKey=BooleanToVisibilityConverter}}">
<ContentPresenter ContentSource="LoadingContent"/>
</Border>
</Grid>
</Border>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Text"
Value=""
SourceName="PART_Editor">
<Setter Property="Visibility"
Value="Visible"
TargetName="PART_Watermark" />
</Trigger>
<Trigger Property="IconPlacement"
Value="Left">
<Setter Property="DockPanel.Dock"
Value="Left"
TargetName="PART_Icon" />
</Trigger>
<Trigger Property="IconPlacement"
Value="Right">
<Setter Property="DockPanel.Dock"
Value="Right"
TargetName="PART_Icon" />
</Trigger>
<Trigger Property="Validation.HasError" Value="True">
<Setter Property="BorderBrush"
Value="Red"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
<Setter Property="Padding" Value="8"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Margin="{TemplateBinding Margin}"
ClipToBounds="{TemplateBinding ClipToBounds}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.3" To="Normal">
<VisualTransition.GeneratedEasingFunction>
<CircleEase EasingMode="EaseOut"/>
</VisualTransition.GeneratedEasingFunction>
</VisualTransition>
</VisualStateGroup.Transitions>
<VisualState Name="Normal"/>
<VisualState Name="MouseOver">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="Opacity"
To="0.1" Duration="0"/>
</Storyboard>
</VisualState>
<VisualState Name="Disabled"/>
</VisualStateGroup>
<VisualStateGroup Name="SelectionStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.6"/>
</VisualStateGroup.Transitions>
<VisualState Name="Selected">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="SelectedBorder"
Storyboard.TargetProperty="Opacity"
To="0.18" Duration="0"/>
</Storyboard>
</VisualState>
<VisualState Name="Unselected"/>
<VisualState Name="SelectedUnfocused">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="SelectedBorder"
Storyboard.TargetProperty="Opacity"
To="0.18" Duration="0"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid>
<Border x:Name="MouseOverBorder"
Opacity="0"
Background="{TemplateBinding Foreground, Converter={StaticResource BrushRoundConverter}}"/>
<Border x:Name="SelectedBorder"
Opacity="0"
Background="{TemplateBinding Foreground, Converter={StaticResource BrushRoundConverter}}"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<ScaleTransform ScaleX="1"/>
</Border.RenderTransform>
</Border>
<wpf:Ripple Feedback="{TemplateBinding Foreground, Converter={StaticResource BrushRoundConverter}}"
Focusable="False"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Padding="{TemplateBinding Padding}"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value=".56" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FSE_UsbMachineIcon" TargetType="ContentControl">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Viewbox Stretch="Uniform">
<Grid RenderOptions.BitmapScalingMode="Fant">
<Image Margin="0 10 0 0" Height="35" Source="{StaticResource FSE_Machine_Small}"></Image>
<Canvas HorizontalAlignment="Right" VerticalAlignment="Top">
<material:PackIcon Kind="Usb" Foreground="{StaticResource FSE_UsbBrush}" Width="24" Height="24" Canvas.Left="-14" Canvas.Top="0" />
</Canvas>
</Grid>
</Viewbox>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FSE_WifiMachineIcon" TargetType="ContentControl">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Viewbox Stretch="Uniform">
<Grid RenderOptions.BitmapScalingMode="Fant">
<Image Margin="0 10 0 0" Height="35" Source="{StaticResource FSE_Machine_Small}"></Image>
<Canvas HorizontalAlignment="Right" VerticalAlignment="Top">
<material:PackIcon Kind="Wifi" Foreground="{StaticResource FSE_WifiBrush}" Width="20" Height="20" Canvas.Left="-11" Canvas.Top="0" />
</Canvas>
</Grid>
</Viewbox>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FSE_SignalRMachineIcon" TargetType="ContentControl">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Viewbox Stretch="Uniform" Height="{Binding RelativeSource={RelativeSource AncestorType=ContentControl},Path=ActualHeight}" Width="{Binding RelativeSource={RelativeSource AncestorType=ContentControl},Path=ActualWidth}">
<Grid RenderOptions.BitmapScalingMode="Fant">
<Image Margin="0 10 0 0" Height="35" Source="{StaticResource FSE_Machine_Small}"></Image>
<Canvas HorizontalAlignment="Right" VerticalAlignment="Top">
<material:PackIcon Kind="Cloud" Foreground="{StaticResource FSE_SignalRBrush}" Width="20" Height="20" Canvas.Left="-14" Canvas.Top="0" />
</Canvas>
</Grid>
</Viewbox>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FSE_EmulatorMachineIcon" TargetType="ContentControl">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Viewbox Stretch="Uniform">
<Grid RenderOptions.BitmapScalingMode="Fant">
<Image Margin="0 10 0 0" Height="35" Source="{StaticResource FSE_Machine_Small}"></Image>
<Canvas HorizontalAlignment="Right" VerticalAlignment="Top">
<material:PackIcon Kind="SdCard" Foreground="{StaticResource FSE_EmulatorBrush}" Width="18" Height="18" Canvas.Left="-14" Canvas.Top="0" />
</Canvas>
</Grid>
</Viewbox>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<DataTemplate x:Key="FSE_LogIcon_Cell">
<material:PackIcon Height="16" Width="14" Margin="0 0 0 0">
<material:PackIcon.Style>
<Style TargetType="material:PackIcon">
<Setter Property="Kind" Value="InfoCircleOutline"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding Category}" Value="Info">
<Setter Property="Kind" Value="InfoCircleOutline"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Category}" Value="Warning">
<Setter Property="Kind" Value="Alert"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_WarningBrush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Category}" Value="Error">
<Setter Property="Kind" Value="Alert"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_ErrorBrush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Category}" Value="Critical">
<Setter Property="Kind" Value="BellAlert"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_ErrorBrush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Category}" Value="Debug">
<Setter Property="Kind" Value="Bug"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_GrayBrush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding CallerMethodName}" Value="OnStartup">
<Setter Property="Kind" Value="ClockOutline"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryAccentBrush}"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</material:PackIcon.Style>
</material:PackIcon>
</DataTemplate>
<Style x:Key="FSE_LogIcon" TargetType="material:PackIcon">
<Setter Property="Kind" Value="InfoCircleOutline"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding Category}" Value="Info">
<Setter Property="Kind" Value="InfoCircleOutline"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Category}" Value="Warning">
<Setter Property="Kind" Value="Alert"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_WarningBrush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Category}" Value="Error">
<Setter Property="Kind" Value="Alert"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_ErrorBrush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Category}" Value="Critical">
<Setter Property="Kind" Value="BellAlert"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_ErrorBrush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding Category}" Value="Debug">
<Setter Property="Kind" Value="Bug"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_GrayBrush}"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="FSE_Rounded_Corners_TextBox" TargetType="TextBox">
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundDarkBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource FSE_BorderBrush}"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
<Setter Property="CaretBrush" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Padding" Value="3"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBoxBase}">
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" CornerRadius="5">
<material:Ripple material:RippleAssist.IsDisabled="{TemplateBinding IsFocused}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Feedback="{StaticResource FSE_PrimaryForegroundBrush}">
<ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
</material:Ripple>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}" TargetName="border"/>
<Setter Property="Foreground" Value="{StaticResource FSE_GrayBrush}"/>
</Trigger>
<Trigger Property="Width" Value="Auto">
<Setter Property="MinWidth" Value="100"/>
</Trigger>
<Trigger Property="Height" Value="Auto">
<Setter Property="MinHeight" Value="20"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FSE_Rounded_Corners_TextBox_Multiline" TargetType="TextBox">
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource FSE_BorderBrush}"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
<Setter Property="VerticalContentAlignment" Value="Top"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
<Setter Property="Height" Value="Auto"></Setter>
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="AcceptsReturn" Value="True"></Setter>
<Setter Property="CaretBrush" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
<Setter Property="Padding" Value="3"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBoxBase}">
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" CornerRadius="5">
<ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{StaticResource FSE_GrayBrush}"/>
</Trigger>
<Trigger Property="Width" Value="Auto">
<Setter Property="MinWidth" Value="100"/>
</Trigger>
<Trigger Property="Height" Value="Auto">
<Setter Property="MinHeight" Value="20"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FSE_DataGrid_Cell" TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
</Style>
<Style x:Key="FSE_DataGrid" TargetType="DataGrid" BasedOn="{StaticResource {x:Type DataGrid}}">
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="AutoGenerateColumns" Value="False"></Setter>
<Setter Property="CanUserAddRows" Value="False"></Setter>
<Setter Property="CanUserDeleteRows" Value="False"></Setter>
<Setter Property="CanUserReorderColumns" Value="False"></Setter>
<Setter Property="CanUserResizeColumns" Value="False"></Setter>
<Setter Property="CanUserResizeRows" Value="False"></Setter>
<Setter Property="CanUserSortColumns" Value="False"></Setter>
<Setter Property="IsReadOnly" Value="True"></Setter>
<Setter Property="SelectionMode" Value="Single"></Setter>
<Setter Property="SelectionUnit" Value="FullRow"></Setter>
<Setter Property="RowHeight" Value="35"></Setter>
<Setter Property="HorizontalGridLinesBrush" Value="{StaticResource FSE_PrimaryBackgroundBrush}"></Setter>
<Setter Property="HorizontalScrollBarVisibility" Value="Disabled"></Setter>
<Setter Property="CellStyle" Value="{StaticResource LogsGridCellStyle}" />
</Style>
<DataTemplate x:Key="FSE_Machine_ItemTemplate_Horizontal">
<DockPanel VerticalAlignment="Center">
<Image RenderOptions.BitmapScalingMode="Fant" Source="{StaticResource FSE_Machine_Small}" Width="24" />
<StackPanel VerticalAlignment="Center" Margin="10 0 0 0" Orientation="Horizontal">
<TextBlock Text="{Binding SerialNumber}" FontSize="{StaticResource FSE_SmallFontSize}"></TextBlock>
<TextBlock Margin="10 0 0 0" FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding Name}"></TextBlock>
</StackPanel>
</DockPanel>
</DataTemplate>
<DataTemplate x:Key="FSE_Machine_ItemTemplate_Vertical">
<DockPanel VerticalAlignment="Center">
<Image RenderOptions.BitmapScalingMode="Fant" Source="{StaticResource FSE_Machine_Small}" Width="32" />
<StackPanel Margin="5 0 0 0">
<TextBlock Text="{Binding SerialNumber}"></TextBlock>
<TextBlock Margin="0 5 0 0" FontSize="{StaticResource FSE_SmallerFontSize}" Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding Name}"></TextBlock>
</StackPanel>
</DockPanel>
</DataTemplate>
<Style x:Key="FSE_AutoComplete_Machines" TargetType="{x:Type editors:AutoCompleteTextBox}" BasedOn="{StaticResource {x:Type editors:AutoCompleteTextBox}}">
<Setter Property="material:HintAssist.Hint" Value="Serial Number"></Setter>
<Setter Property="DisplayMember" Value="SerialNumber"></Setter>
<Setter Property="SelectedItemTemplate">
<Setter.Value>
<DataTemplate>
<DockPanel VerticalAlignment="Center">
<commonControls:MachineIcon Height="24" />
<StackPanel VerticalAlignment="Center" Margin="10 0 0 0" Orientation="Horizontal">
<TextBlock Text="{Binding SerialNumber}" FontSize="{StaticResource FSE_SmallFontSize}"></TextBlock>
<TextBlock Margin="10 0 0 0" FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding Name}"></TextBlock>
</StackPanel>
</DockPanel>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate>
<DockPanel VerticalAlignment="Center">
<commonControls:MachineIcon Height="32" />
<StackPanel Margin="5 0 0 0">
<TextBlock Text="{Binding SerialNumber}"></TextBlock>
<TextBlock Margin="0 5 0 0" FontSize="{StaticResource FSE_SmallerFontSize}" Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding Name}"></TextBlock>
</StackPanel>
</DockPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FSE_LogsGridCellStyle" TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
</Style>
<Style x:Key="FSE_LogsGridStyle" TargetType="DataGrid" BasedOn="{StaticResource {x:Type DataGrid}}">
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_GrayBrush}"></Setter>
<Setter Property="AutoGenerateColumns" Value="False"></Setter>
<Setter Property="CanUserAddRows" Value="False"></Setter>
<Setter Property="CanUserDeleteRows" Value="False"></Setter>
<Setter Property="CanUserReorderColumns" Value="False"></Setter>
<Setter Property="CanUserResizeColumns" Value="False"></Setter>
<Setter Property="CanUserResizeRows" Value="False"></Setter>
<Setter Property="CanUserSortColumns" Value="False"></Setter>
<Setter Property="IsReadOnly" Value="True"></Setter>
<Setter Property="SelectionMode" Value="Single"></Setter>
<Setter Property="SelectionUnit" Value="FullRow"></Setter>
<Setter Property="RowHeight" Value="35"></Setter>
<Setter Property="HorizontalGridLinesBrush" Value="{StaticResource FSE_PrimaryBackgroundBrush}"></Setter>
<Setter Property="HorizontalScrollBarVisibility" Value="Disabled"></Setter>
<Setter Property="CellStyle" Value="{StaticResource LogsGridCellStyle}" />
</Style>
<Style TargetType="{x:Type ListBoxItem}" x:Key="FSE_BlankListBoxItem">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
<Setter Property="Padding" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Background="{TemplateBinding Background}" Padding="0" SnapsToDevicePixels="true">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Background" TargetName="Bd" Value="Transparent"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="true"/>
<Condition Property="Selector.IsSelectionActive" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="Transparent"/>
</MultiTrigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
<Setter Property="Background" TargetName="Bd" Value="Transparent"/>
<Setter Property="Background" Value="Transparent"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type ListBox}" x:Key="FSE_BlankListBox">
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent"/>
</Style.Resources>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"></Setter>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"></Setter>
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="ItemContainerStyle" Value="{StaticResource FSE_BlankListBoxItem}"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</ScrollViewer>
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsGrouping" Value="true"/>
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="UserControl" x:Key="FSE_User_Control_Designer">
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundBrush}"></Setter>
</Style>
<Style TargetType="ToolTip">
<Setter Property="FontFamily" Value="{StaticResource flexo}"></Setter>
<Setter Property="FontSize" Value="{StaticResource FSE_SmallFontSize}"></Setter>
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLighterBrush}"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="HasDropShadow" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToolTip">
<Border Name="Border"
BorderThickness="1"
Padding="8 3"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Background="{TemplateBinding Background}"
BorderBrush="{StaticResource FSE_BorderBrush}">
<ContentPresenter Margin="4" HorizontalAlignment="Left" VerticalAlignment="Top" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="HasDropShadow" Value="true">
<Setter TargetName="Border" Property="CornerRadius" Value="4" />
<Setter TargetName="Border" Property="SnapsToDevicePixels" Value="true" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FSE_Toolbar_ToggleButton" TargetType="ToggleButton">
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource FSE_BorderBrush}"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="material:ButtonAssist.CornerRadius" Value="3"></Setter>
<Setter Property="material:ToggleButtonAssist.SwitchTrackOnBackground" Value="{StaticResource FSE_PrimaryAccentBrush}"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
<Setter Property="Padding" Value="5"></Setter>
<Setter Property="Width" Value="Auto"></Setter>
<Setter Property="Height" Value="Auto"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Cursor" Value="Hand"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border x:Name="border" Padding="{TemplateBinding Padding}" TextElement.Foreground="{TemplateBinding Foreground}" CornerRadius="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=(material:ButtonAssist.CornerRadius)}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" />
</Border.Effect>
<ContentPresenter TextElement.Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="False">
<Setter TargetName="border" Property="Background" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=Background}"></Setter>
<Setter TargetName="border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=BorderBrush}"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="border" Property="Background">
<Setter.Value>
<LinearGradientBrush>
<GradientStop Color="{StaticResource FSE_PrimaryBackgroundDarkColor}" Offset="0" />
<GradientStop Color="{StaticResource FSE_PrimaryBackgroundLightColor}" Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter TargetName="border" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=(material:ToggleButtonAssist.SwitchTrackOnBackground)}"></Setter>
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource Mode=Self},Path=(material:ToggleButtonAssist.SwitchTrackOnBackground)}"></Setter>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FSE_Game_GroupBox" TargetType="GroupBox">
<Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundMidBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Setter>
<Setter Property="FontSize" Value="{StaticResource FSE_SmallFontSize}"></Setter>
<Setter Property="Padding" Value="8"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GroupBox">
<DockPanel>
<Grid DockPanel.Dock="Top">
<Polygon HorizontalAlignment="Left" VerticalAlignment="Top" Width="{Binding ElementName=border,Path=ActualWidth}" Height="{Binding ElementName=border,Path=ActualHeight}" Fill="{StaticResource FSE_PrimaryBackgroundLighterBrush}" Stretch="Fill" Points="0,0 100,0 130,30 0,30"></Polygon>
<Grid VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40*" />
<ColumnDefinition Width="60*" />
</Grid.ColumnDefinitions>
<Border VerticalAlignment="Top" Padding="0 0 50 0" x:Name="border">
<Border Padding="{TemplateBinding Padding}" TextElement.FontSize="{StaticResource FSE_DefaultFontSize}">
<ContentPresenter Content="{TemplateBinding Header}" />
</Border>
</Border>
</Grid>
</Grid>
<Border TextElement.Foreground="{TemplateBinding Foreground}" TextElement.FontSize="{TemplateBinding FontSize}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" CornerRadius="0 3 3 3" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
<ContentPresenter Content="{TemplateBinding Content}" />
</Border>
</DockPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type controls:SearchComboBox}" BasedOn="{StaticResource MaterialDesignComboBox}">
<Setter Property="KeyboardNavigation.DirectionalNavigation" Value="Once"></Setter>
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate>
<TextBlock Text="{Binding}"></TextBlock>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:SearchComboBox}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid Background="Transparent">
<DockPanel>
<Grid VerticalAlignment="Center" Margin="15 10 0 10" DockPanel.Dock="Right" Width="8" Height="8">
<Path Stretch="Uniform" Data="M7,10L12,15L17,10H7Z" Fill="{StaticResource FSE_GrayBrush}">
</Path>
</Grid>
<ContentControl Focusable="False" FocusVisualStyle="{x:Null}" VerticalAlignment="Bottom" Margin="0 0 0 5" Content="{TemplateBinding SelectedItem}" ContentTemplate="{TemplateBinding ItemTemplate}">
</ContentControl>
</DockPanel>
<ToggleButton x:Name="btnToggle" Focusable="False" FocusVisualStyle="{x:Null}" KeyboardNavigation.DirectionalNavigation="Once" Opacity="0" Style="{x:Null}" IsChecked="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=IsOpened,Mode=TwoWay}">
</ToggleButton>
<Popup StaysOpen="False" MinWidth="{Binding ElementName=btnToggle,Path=ActualWidth}" PlacementTarget="{Binding ElementName=btnToggle}" Placement="Bottom" IsOpen="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=IsOpened,Mode=TwoWay}" MaxHeight="{TemplateBinding MaxDropDownHeight}" AllowsTransparency="True">
<Border Margin="5" Background="{StaticResource WhiteBrush}" CornerRadius="3" Padding="5" MinWidth="{Binding ElementName=btnToggle,Path=ActualWidth}">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" />
</Border.Effect>
<DockPanel>
<TextBox x:Name="txt" KeyboardNavigation.DirectionalNavigation="Once" DockPanel.Dock="Top" Margin="10" Padding="0 5" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=SearchFilter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
<ListBox x:Name="list" FocusVisualStyle="{x:Null}" ItemsSource="{TemplateBinding ListItemsSource}" ItemTemplate="{TemplateBinding ItemTemplate}" DisplayMemberPath="{TemplateBinding DisplayMemberPath}">
</ListBox>
</DockPanel>
</Border>
</Popup>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type ToggleButton}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}"/>
<Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}"/>
<Setter Property="wpf:ToggleButtonAssist.SwitchTrackOnBackground" Value="Black"/>
<Setter Property="wpf:ToggleButtonAssist.SwitchTrackOffBackground" Value="Black"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0 1 0 0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<ControlTemplate.Resources>
<SineEase x:Key="RippleEasingFunction" EasingMode="EaseInOut"/>
<Storyboard x:Key="ShowRipple">
<DoubleAnimation Storyboard.TargetName="RippleThumb" Storyboard.TargetProperty="Opacity"
EasingFunction="{StaticResource RippleEasingFunction}"
To="0.26" Duration="0"/>
<DoubleAnimation Storyboard.TargetName="RippleThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
EasingFunction="{StaticResource RippleEasingFunction}"
From="1" To="2.5" Duration="0:0:0.2"/>
<DoubleAnimation Storyboard.TargetName="RippleThumb" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
EasingFunction="{StaticResource RippleEasingFunction}"
From="1" To="2.5" Duration="0:0:0.2"/>
</Storyboard>
<Storyboard x:Key="HideRipple">
<DoubleAnimation Storyboard.TargetName="RippleThumb" Storyboard.TargetProperty="Opacity"
EasingFunction="{StaticResource RippleEasingFunction}"
To="0" Duration="0:0:0.3"/>
</Storyboard>
</ControlTemplate.Resources>
<Viewbox Width="34">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CheckStates">
<VisualStateGroup.Transitions>
<VisualTransition From="*" To="Checked">
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="ThumbHolder">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="23.5">
<EasingDoubleKeyFrame.EasingFunction>
<QuadraticEase EasingMode="EaseOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualTransition>
<VisualTransition From="Checked" To="Unchecked">
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="ThumbHolder">
<EasingDoubleKeyFrame KeyTime="0" Value="23.5"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0">
<EasingDoubleKeyFrame.EasingFunction>
<QuadraticEase EasingMode="EaseOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualTransition>
</VisualStateGroup.Transitions>
<VisualState x:Name="Checked">
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="ThumbHolder"
Duration="0" To="23.5" />
</Storyboard>
</VisualState>
<VisualState x:Name="Unchecked">
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="ThumbHolder"
Duration="0" To="0" />
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid>
<Rectangle x:Name="Track"
Fill= "{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ToggleButtonAssist.SwitchTrackOffBackground)}"
Opacity="0.26"
HorizontalAlignment="Left"
Height="15"
Margin="4.211,5,4.211,0"
Stroke="{x:Null}"
VerticalAlignment="Top"
Width="40"
RadiusY="7.5"
RadiusX="7.5"/>
<Grid x:Name="ThumbHolder"
HorizontalAlignment="Left" VerticalAlignment="Top">
<Ellipse x:Name="RippleThumb"
Fill="{DynamicResource PrimaryHueLightBrush}"
Height="25" Width="25"
IsHitTestVisible="False"
Opacity="0.26"
Margin="0"
HorizontalAlignment="Center" VerticalAlignment="Center"
RenderTransformOrigin="0.5,0.5">
<Ellipse.RenderTransform>
<ScaleTransform ScaleX="1" ScaleY="1"/>
</Ellipse.RenderTransform>
</Ellipse>
<AdornerDecorator CacheMode="{Binding RelativeSource={RelativeSource Self}, Path=(wpf:ShadowAssist.CacheMode)}">
<Ellipse x:Name="Thumb"
Fill="#707070" Stroke="{x:Null}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Width="25" Height="25"
Margin="0,0,0,0"
RenderTransformOrigin="0.5,0.5"
Effect="{DynamicResource MaterialDesignShadowDepth1}">
</Ellipse>
</AdornerDecorator>
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}"
Margin="{TemplateBinding Padding}"
x:Name="ContentPresenter"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
FlowDirection="LeftToRight"/>
<Grid.RenderTransform>
<TranslateTransform X="0" Y="0"/>
</Grid.RenderTransform>
</Grid>
</Grid>
</Viewbox>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Thumb" Property="Fill" Value="{StaticResource FSE_PrimaryAccentBrush}" />
<Setter TargetName="Track" Property="Fill" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ToggleButtonAssist.SwitchTrackOnBackground)}" />
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsChecked" Value="True" />
<Condition Property="wpf:ToggleButtonAssist.HasOnContent" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="ContentPresenter" Property="Content" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ToggleButtonAssist.OnContent)}" />
<Setter TargetName="ContentPresenter" Property="ContentTemplate" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ToggleButtonAssist.OnContentTemplate)}" />
</MultiTrigger>
<Trigger Property="IsChecked" Value="False">
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidBrush}"/>
<!-- Need to set Foreground to Background here instead of hardcoded PrimaryHueMidBrush -->
</Trigger>
<Trigger Property="Button.IsDefaulted" Value="true"/>
<Trigger Property="IsMouseOver" Value="true"/>
<Trigger Property="IsPressed" Value="true">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource ShowRipple}"/>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource HideRipple}"/>
</Trigger.ExitActions>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="Thumb" Property="Fill" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}" />
<Setter TargetName="Track" Property="Fill" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Separator">
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Setter>
</Style>
</ResourceDictionary>
|