-
Notifications
You must be signed in to change notification settings - Fork 5.4k
/
App.xaml
2434 lines (2332 loc) · 199 KB
/
App.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
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
<Application x:Class="CalculatorApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="using:CalculatorApp.Controls"
xmlns:common="using:CalculatorApp.Common"
xmlns:contract7NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,7)"
xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
xmlns:converters="using:CalculatorApp.Converters"
xmlns:local="using:CalculatorApp"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives"
xmlns:utils="using:CalculatorApp.Utils">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls"/>
<!-- Overwrite some resources of WinUI -->
<ResourceDictionary>
<!-- overwrite the background of navigationview content to transparent to show Mica background -->
<StaticResource x:Key="NavigationViewContentBackground" ResourceKey="SystemControlTransparentBrush"/>
<!-- overwrite the NavigationView content margin -->
<Thickness x:Key="NavigationViewContentPresenterMargin">0</Thickness>
<!-- overwrite the NavigationView content border thickness -->
<Thickness x:Key="NavigationViewMinimalContentGridBorderThickness">0</Thickness>
<!-- overwrite the NavigationView pane background -->
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<StaticResource x:Key="DarkAcrylicInAppFillColorDefaultBrush" ResourceKey="AcrylicInAppFillColorDefaultBrush"/>
<StaticResource x:Key="NavigationViewDefaultPaneBackground" ResourceKey="DarkAcrylicInAppFillColorDefaultBrush"/>
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<StaticResource x:Key="LightAcrylicInAppFillColorDefaultBrush" ResourceKey="AcrylicInAppFillColorDefaultBrush"/>
<StaticResource x:Key="NavigationViewDefaultPaneBackground" ResourceKey="LightAcrylicInAppFillColorDefaultBrush"/>
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<StaticResource x:Key="HCAcrylicInAppFillColorDefaultBrush" ResourceKey="AcrylicInAppFillColorDefaultBrush"/>
<StaticResource x:Key="NavigationViewDefaultPaneBackground" ResourceKey="HCAcrylicInAppFillColorDefaultBrush"/>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<Thickness x:Key="ControlBorderThemeThickness">0</Thickness>
<Thickness x:Key="HighContrastThicknessTop">0,0,0,0</Thickness>
<x:Double x:Key="HighContrastStrokeThickness">0</x:Double>
<Color x:Key="AltHighColor">#FF000000</Color>
<Color x:Key="ChromeMediumLowColor">#FF2B2B2B</Color>
<Color x:Key="OperatorPanelScrollButtonBackgroundColor">#FF858585</Color>
<SolidColorBrush x:Key="SystemControlBackgroundAltHighBrush" Color="{StaticResource AltHighColor}"/>
<SolidColorBrush x:Key="SystemControlBackgroundChromeMediumLowBrush" Color="{StaticResource ChromeMediumLowColor}"/>
<SolidColorBrush x:Key="SystemControlBackgroundTransparentBrush" Color="Transparent"/>
<SolidColorBrush x:Key="SystemControlHighlightTransparentBrush" Color="Transparent"/>
<SolidColorBrush x:Key="AppBackgroundAltMediumLowBrush" Color="{ThemeResource SystemAltMediumLowColor}"/>
<SolidColorBrush x:Key="AppOperatorPanelBackground"
Opacity="0.4"
Color="{ThemeResource SystemAltMediumLowColor}"/>
<SolidColorBrush x:Key="AppControlPageTextBaseMediumHighBrush" Color="{StaticResource SystemBaseMediumHighColor}"/>
<RevealBackgroundBrush x:Key="AppControlHoverButtonFaceBrush"
FallbackColor="#18FFFFFF"
Color="#18FFFFFF"/>
<RevealBackgroundBrush x:Key="AppControlPressedButtonFaceBrush"
FallbackColor="#30FFFFFF"
Color="#30FFFFFF"/>
<SolidColorBrush x:Key="AppControlTransparentAccentColorBrush" Color="{ThemeResource SystemAccentColor}"/>
<SolidColorBrush x:Key="AppControlPageTextBaseHighColorBrush" Color="{StaticResource SystemBaseHighColor}"/>
<SolidColorBrush x:Key="OperatorPanelScrollButtonBackgroundBrush" Color="{ThemeResource OperatorPanelScrollButtonBackgroundColor}"/>
<SolidColorBrush x:Key="AppControlHighlightCalcButtonBrush"
Opacity="0.4"
Color="{ThemeResource SystemAccentColor}"/>
<SolidColorBrush x:Key="AppControlHighlightCalcButtonToggledBrush"
Opacity="0.4"
Color="{ThemeResource SystemAccentColor}"/>
<SolidColorBrush x:Key="AppControlHighlightCalcButtonHoverBrush"
Opacity="0.9"
Color="{ThemeResource SystemAccentColor}"/>
<SolidColorBrush x:Key="AppControlForegroundAccentBrush" Color="{ThemeResource SystemAccentColor}"/>
<SolidColorBrush x:Key="AppControlPageTextRedColorBrush" Color="Red"/>
<RevealBorderBrush x:Key="AppControlForegroundTransparentRevealBorderBrush"
FallbackColor="Transparent"
TargetTheme="Dark"
Color="Transparent"/>
<RevealBackgroundBrush x:Key="AppControlHighlightAccentRevealBackgroundBrush"
FallbackColor="{ThemeResource SystemAccentColor}"
TargetTheme="Dark"
Color="{ThemeResource SystemAccentColor}"/>
<RevealBackgroundBrush x:Key="AppControlBackgroundListAccentHighRevealBackgroundBrush"
FallbackColor="{ThemeResource SystemAccentColorDark3}"
TargetTheme="Dark"
Color="{ThemeResource SystemAccentColorDark3}"/>
<AcrylicBrush x:Key="AppChromeAcrylicHostBackdropMediumLowBrush"
BackgroundSource="HostBackdrop"
FallbackColor="{ThemeResource SystemChromeMediumColor}"
TintColor="{ThemeResource SystemChromeLowColor}"
TintOpacity="0.7"/>
<ApplicationTheme x:Key="CalcApplicationTheme">Dark</ApplicationTheme>
<SolidColorBrush x:Key="AppChromeAcrylicOperatorFlyoutBackgroundBrush" Color="#FF2F2F2F"/>
<SolidColorBrush x:Key="AppControlTransparentButtonBackgroundBrush" Color="Transparent"/>
<SolidColorBrush x:Key="EquationBrush1" Color="#4D92C8"/>
<SolidColorBrush x:Key="EquationBrush2" Color="#4DCDD5"/>
<SolidColorBrush x:Key="EquationBrush3" Color="#A366E0"/>
<SolidColorBrush x:Key="EquationBrush4" Color="#58A358"/>
<SolidColorBrush x:Key="EquationBrush5" Color="#4DDB97"/>
<SolidColorBrush x:Key="EquationBrush6" Color="#4DA688"/>
<SolidColorBrush x:Key="EquationBrush7" Color="#8A8B8C"/>
<SolidColorBrush x:Key="EquationBrush8" Color="#EF5865"/>
<SolidColorBrush x:Key="EquationBrush9" Color="#EB4DAF"/>
<SolidColorBrush x:Key="EquationBrush10" Color="#CA5B93"/>
<SolidColorBrush x:Key="EquationBrush11" Color="#FFCE4D"/>
<SolidColorBrush x:Key="EquationBrush12" Color="#F99255"/>
<SolidColorBrush x:Key="EquationBrush13" Color="#B0896D"/>
<SolidColorBrush x:Key="EquationBrush14" Color="#FFFFFF"/>
<StaticResource x:Key="CalcButtonTextFillColorDefaultBrush" ResourceKey="TextFillColorPrimaryBrush"/>
<StaticResource x:Key="CalcButtonTextFillColorHoverBrush" ResourceKey="TextFillColorPrimaryBrush"/>
<StaticResource x:Key="CalcButtonTextFillColorPressedBrush" ResourceKey="TextFillColorSecondaryBrush"/>
<StaticResource x:Key="CalcButtonTextFillColorDisabledBrush" ResourceKey="TextFillColorDisabledBrush"/>
<Color x:Key="CalcButtonBaseFillColor">#FFFFFF</Color>
<SolidColorBrush x:Key="CalcButtonFillColorDefaultBrush"
Opacity="0.125"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonFillColorHoverBrush"
Opacity="0.0852"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonFillColorPressedBrush"
Opacity="0.0359"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonFillColorDisabledBrush"
Opacity="0.0359"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonAltFillColorDefaultBrush"
Opacity="0.0852"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonAltFillColorHoverBrush"
Opacity="0.1256"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonAltFillColorPressedBrush"
Opacity="0.0852"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonAltFillColorDisabledBrush"
Opacity="0.0359"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<Color x:Key="BackgroundSmokeFillColor">#000000</Color>
<SolidColorBrush x:Key="BackgroundSmokeFillColorBrush"
Opacity="0.42"
Color="{StaticResource BackgroundSmokeFillColor}"/>
<StaticResource x:Key="AppControlForegroundSecondaryBrush" ResourceKey="TextFillColorSecondaryBrush"/>
<StaticResource x:Key="AppControlBackgroundTertiaryBrush" ResourceKey="SubtleFillColorTertiaryBrush"/>
<StaticResource x:Key="AppControlBackgroundSecondaryBrush" ResourceKey="SubtleFillColorSecondaryBrush"/>
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<Thickness x:Key="ControlBorderThemeThickness">0</Thickness>
<Thickness x:Key="HighContrastThicknessTop">0,0,0,0</Thickness>
<x:Double x:Key="HighContrastStrokeThickness">0</x:Double>
<Color x:Key="AltHighColor">#FFF2F2F2</Color>
<Color x:Key="ChromeMediumLowColor">#FFE0E0E0</Color>
<Color x:Key="OperatorPanelScrollButtonBackgroundColor">#FF858585</Color>
<SolidColorBrush x:Key="SystemControlBackgroundAltHighBrush" Color="{StaticResource SystemAltHighColor}"/>
<SolidColorBrush x:Key="SystemControlBackgroundChromeMediumLowBrush" Color="{StaticResource ChromeMediumLowColor}"/>
<SolidColorBrush x:Key="SystemControlBackgroundTransparentBrush" Color="Transparent"/>
<SolidColorBrush x:Key="SystemControlHighlightTransparentBrush" Color="Transparent"/>
<SolidColorBrush x:Key="AppBackgroundAltMediumLowBrush" Color="{ThemeResource SystemAltMediumLowColor}"/>
<SolidColorBrush x:Key="AppOperatorPanelBackground"
Opacity="0.4"
Color="{ThemeResource SystemAltMediumLowColor}"/>
<SolidColorBrush x:Key="AppControlPageTextBaseMediumHighBrush" Color="{StaticResource SystemBaseMediumHighColor}"/>
<RevealBackgroundBrush x:Key="AppControlHoverButtonFaceBrush"
FallbackColor="#17000000"
Color="#17000000"/>
<RevealBackgroundBrush x:Key="AppControlPressedButtonFaceBrush"
FallbackColor="#30000000"
Color="#30000000"/>
<SolidColorBrush x:Key="AppControlTransparentAccentColorBrush" Color="{ThemeResource SystemAccentColor}"/>
<SolidColorBrush x:Key="AppControlPageTextBaseHighColorBrush" Color="{StaticResource SystemBaseHighColor}"/>
<SolidColorBrush x:Key="OperatorPanelScrollButtonBackgroundBrush" Color="{ThemeResource OperatorPanelScrollButtonBackgroundColor}"/>
<SolidColorBrush x:Key="AppControlForegroundAccentBrush" Color="{ThemeResource SystemAccentColor}"/>
<SolidColorBrush x:Key="AppControlPageTextRedColorBrush" Color="Red"/>
<SolidColorBrush x:Key="AppControlHighlightCalcButtonBrush"
Opacity="0.4"
Color="{ThemeResource SystemAccentColor}"/>
<SolidColorBrush x:Key="AppControlHighlightCalcButtonToggledBrush"
Opacity="0.4"
Color="{ThemeResource SystemAccentColor}"/>
<SolidColorBrush x:Key="AppControlHighlightCalcButtonHoverBrush"
Opacity="0.7"
Color="{ThemeResource SystemAccentColor}"/>
<RevealBorderBrush x:Key="AppControlForegroundTransparentRevealBorderBrush"
FallbackColor="Transparent"
TargetTheme="Light"
Color="Transparent"/>
<RevealBackgroundBrush x:Key="AppControlHighlightAccentRevealBackgroundBrush"
FallbackColor="{ThemeResource SystemAccentColor}"
TargetTheme="Light"
Color="{ThemeResource SystemAccentColor}"/>
<RevealBackgroundBrush x:Key="AppControlBackgroundListAccentHighRevealBackgroundBrush"
FallbackColor="{ThemeResource SystemAccentColorLight3}"
TargetTheme="Light"
Color="{ThemeResource SystemAccentColorLight3}"/>
<AcrylicBrush x:Key="AppChromeAcrylicHostBackdropMediumLowBrush"
BackgroundSource="HostBackdrop"
FallbackColor="{ThemeResource SystemChromeMediumColor}"
TintColor="{ThemeResource SystemChromeLowColor}"
TintOpacity="0.7"/>
<AcrylicBrush x:Key="AppChromeAcrylicOperatorFlyoutBackgroundBrush"
BackgroundSource="HostBackdrop"
FallbackColor="{ThemeResource SystemChromeMediumColor}"
TintColor="{ThemeResource SystemChromeLowColor}"
TintOpacity="0.8"/>
<ApplicationTheme x:Key="CalcApplicationTheme">Light</ApplicationTheme>
<SolidColorBrush x:Key="AppControlTransparentButtonBackgroundBrush" Color="Transparent"/>
<SolidColorBrush x:Key="EquationBrush1" Color="#FF0063B1"/>
<SolidColorBrush x:Key="EquationBrush2" Color="#FF00B7C3"/>
<SolidColorBrush x:Key="EquationBrush3" Color="#FF6600CC"/>
<SolidColorBrush x:Key="EquationBrush4" Color="#FF107C10"/>
<SolidColorBrush x:Key="EquationBrush5" Color="#FF00CC6A"/>
<SolidColorBrush x:Key="EquationBrush6" Color="#FF008055"/>
<SolidColorBrush x:Key="EquationBrush7" Color="#FF58595B"/>
<SolidColorBrush x:Key="EquationBrush8" Color="#FFE81123"/>
<SolidColorBrush x:Key="EquationBrush9" Color="#FFE3008C"/>
<SolidColorBrush x:Key="EquationBrush10" Color="#FFB31564"/>
<SolidColorBrush x:Key="EquationBrush11" Color="#FFFFB900"/>
<SolidColorBrush x:Key="EquationBrush12" Color="#FFF7630C"/>
<SolidColorBrush x:Key="EquationBrush13" Color="#FF8E562E"/>
<SolidColorBrush x:Key="EquationBrush14" Color="#FF000000"/>
<StaticResource x:Key="CalcButtonTextFillColorDefaultBrush" ResourceKey="TextFillColorPrimaryBrush"/>
<StaticResource x:Key="CalcButtonTextFillColorHoverBrush" ResourceKey="TextFillColorPrimaryBrush"/>
<StaticResource x:Key="CalcButtonTextFillColorPressedBrush" ResourceKey="TextFillColorSecondaryBrush"/>
<StaticResource x:Key="CalcButtonTextFillColorDisabledBrush" ResourceKey="TextFillColorDisabledBrush"/>
<Color x:Key="CalcButtonBaseFillColor">#FFFFFF</Color>
<SolidColorBrush x:Key="CalcButtonFillColorDefaultBrush"
Opacity="1"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonFillColorHoverBrush"
Opacity="0.75"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonFillColorPressedBrush"
Opacity="0.5"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonFillColorDisabledBrush"
Opacity="0.125"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonAltFillColorDefaultBrush"
Opacity="0.5"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonAltFillColorHoverBrush"
Opacity="0.25"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonAltFillColorPressedBrush"
Opacity="0.125"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<SolidColorBrush x:Key="CalcButtonAltFillColorDisabledBrush"
Opacity="0.125"
Color="{StaticResource CalcButtonBaseFillColor}"/>
<Color x:Key="BackgroundSmokeFillColor">#000000</Color>
<SolidColorBrush x:Key="BackgroundSmokeFillColorBrush"
Opacity="0.3"
Color="{StaticResource BackgroundSmokeFillColor}"/>
<StaticResource x:Key="AppControlForegroundSecondaryBrush" ResourceKey="TextFillColorSecondaryBrush"/>
<StaticResource x:Key="AppControlBackgroundTertiaryBrush" ResourceKey="SubtleFillColorTertiaryBrush"/>
<StaticResource x:Key="AppControlBackgroundSecondaryBrush" ResourceKey="SubtleFillColorSecondaryBrush"/>
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<Thickness x:Key="ControlBorderThemeThickness">1</Thickness>
<Thickness x:Key="HighContrastThicknessTop">0,1,0,0</Thickness>
<x:Double x:Key="HighContrastStrokeThickness">2</x:Double>
<SolidColorBrush x:Key="SystemControlBackgroundAltHighBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
<SolidColorBrush x:Key="SystemControlBackgroundChromeMediumLowBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
<SolidColorBrush x:Key="SystemControlBackgroundTransparentBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
<SolidColorBrush x:Key="SystemControlHighlightTransparentBrush" Color="{ThemeResource SystemColorHighlightColor}"/>
<SolidColorBrush x:Key="AppBackgroundAltMediumLowBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
<SolidColorBrush x:Key="AppOperatorPanelBackground" Color="{ThemeResource SystemColorButtonFaceColor}"/>
<SolidColorBrush x:Key="AppControlPageTextBaseMediumHighBrush" Color="{ThemeResource SystemColorWindowTextColor}"/>
<SolidColorBrush x:Key="AppControlHoverButtonFaceBrush" Color="{ThemeResource SystemColorHighlightColor}"/>
<SolidColorBrush x:Key="AppControlPressedButtonFaceBrush" Color="{ThemeResource SystemColorHighlightColor}"/>
<SolidColorBrush x:Key="AppControlTransparentAccentColorBrush" Color="Transparent"/>
<SolidColorBrush x:Key="AppControlPageTextBaseHighColorBrush" Color="{ThemeResource SystemColorWindowTextColor}"/>
<SolidColorBrush x:Key="OperatorPanelScrollButtonBackgroundBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
<SolidColorBrush x:Key="AppControlForegroundAccentBrush" Color="{ThemeResource SystemColorButtonTextColor}"/>
<SolidColorBrush x:Key="AppControlPageTextRedColorBrush" Color="{ThemeResource SystemColorWindowTextColor}"/>
<SolidColorBrush x:Key="AppControlForegroundTransparentRevealBorderBrush" Color="{ThemeResource SystemColorButtonTextColor}"/>
<SolidColorBrush x:Key="AppControlHighlightAccentRevealBackgroundBrush" Color="{ThemeResource SystemColorHighlightColor}"/>
<SolidColorBrush x:Key="AppControlBackgroundListAccentHighRevealBackgroundBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
<SolidColorBrush x:Key="AppControlListLowRevealHighlightBrush" Color="{ThemeResource SystemColorHighlightColor}"/>
<SolidColorBrush x:Key="AppChromeAcrylicHostBackdropMediumLowBrush" Color="{ThemeResource SystemColorWindowColor}"/>
<SolidColorBrush x:Key="AppChromeAcrylicOperatorFlyoutBackgroundBrush" Color="{ThemeResource SystemColorWindowColor}"/>
<SolidColorBrush x:Key="AppControlHighlightCalcButtonBrush" Color="{ThemeResource SystemColorWindowColor}"/>
<SolidColorBrush x:Key="AppControlHighlightCalcButtonToggledBrush" Color="{ThemeResource SystemColorHighlightColor}"/>
<SolidColorBrush x:Key="AppControlHighlightCalcButtonHoverBrush" Color="{ThemeResource SystemColorHighlightColor}"/>
<SolidColorBrush x:Key="AppControlTransparentButtonBackgroundBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
<ApplicationTheme x:Key="CalcApplicationTheme">Dark</ApplicationTheme>
<SolidColorBrush x:Key="EquationBrush1" Color="{ThemeResource SystemColorGrayTextColor}"/>
<SolidColorBrush x:Key="EquationBrush2" Color="{ThemeResource SystemColorHighlightColor}"/>
<SolidColorBrush x:Key="EquationBrush3" Color="{ThemeResource SystemColorHotlightColor}"/>
<SolidColorBrush x:Key="EquationBrush4" Color="{ThemeResource SystemColorWindowTextColor}"/>
<StaticResource x:Key="CalcButtonFillColorDefaultBrush" ResourceKey="SystemControlBackgroundBaseLowBrush"/>
<StaticResource x:Key="CalcButtonFillColorHoverBrush" ResourceKey="SystemColorHighlightTextColorBrush"/>
<StaticResource x:Key="CalcButtonFillColorPressedBrush" ResourceKey="SystemColorHighlightTextColorBrush"/>
<StaticResource x:Key="CalcButtonFillColorDisabledBrush" ResourceKey="SystemControlBackgroundBaseLowBrush"/>
<StaticResource x:Key="CalcButtonTextFillColorDefaultBrush" ResourceKey="SystemColorButtonTextColorBrush"/>
<StaticResource x:Key="CalcButtonTextFillColorHoverBrush" ResourceKey="SystemControlHighlightBaseHighBrush"/>
<StaticResource x:Key="CalcButtonTextFillColorPressedBrush" ResourceKey="SystemControlHighlightBaseHighBrush"/>
<StaticResource x:Key="CalcButtonTextFillColorDisabledBrush" ResourceKey="SystemControlDisabledBaseMediumLowBrush"/>
<StaticResource x:Key="CalcButtonAltFillColorDefaultBrush" ResourceKey="SystemControlBackgroundBaseLowBrush"/>
<StaticResource x:Key="CalcButtonAltFillColorHoverBrush" ResourceKey="SystemColorHighlightTextColorBrush"/>
<StaticResource x:Key="CalcButtonAltFillColorPressedBrush" ResourceKey="SystemColorHighlightTextColorBrush"/>
<StaticResource x:Key="CalcButtonAltFillColorDisabledBrush" ResourceKey="SystemControlBackgroundBaseLowBrush"/>
<StaticResource x:Key="BackgroundSmokeFillColorBrush" ResourceKey="SystemControlBackgroundTransparentBrush"/>
<StaticResource x:Key="AppControlForegroundSecondaryBrush" ResourceKey="SystemColorHighlightTextColorBrush"/>
<StaticResource x:Key="AppControlBackgroundTertiaryBrush" ResourceKey="SystemControlBackgroundTransparentBrush"/>
<StaticResource x:Key="AppControlBackgroundSecondaryBrush" ResourceKey="SystemControlHighlightTransparentBrush"/>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
<!-- Min Window Height/Width -->
<x:Double x:Key="AppMinWindowHeight">500</x:Double>
<x:Double x:Key="AppMinWindowWidth">320</x:Double>
<FontFamily x:Key="CalculatorFontFamily">ms-appx:///Assets/CalculatorIcons.ttf#Calculator Fluent Icons</FontFamily>
<x:Double x:Key="SplitViewOpenPaneLength">256</x:Double>
<Thickness x:Key="PivotPortraitThemePadding">0,1,0,0</Thickness>
<x:Double x:Key="PivotHeaderItemFontSize">14</x:Double>
<FontWeight x:Key="PivotHeaderItemThemeFontWeight">Normal</FontWeight>
<x:Double x:Key="OperatorPanelButtonRowSizeLarge">70</x:Double>
<x:Double x:Key="OperatorPanelFontSizeLarge">24</x:Double>
<x:Double x:Key="OperatorPanelGlyphFontSizeLarge">24</x:Double>
<x:Double x:Key="OperatorPanelChevronFontSizeLarge">16</x:Double>
<x:Double x:Key="OperatorPanelButtonRowSizeMedium">70</x:Double>
<x:Double x:Key="OperatorPanelFontSizeMedium">16</x:Double>
<x:Double x:Key="OperatorPanelGlyphFontSizeMedium">20</x:Double>
<x:Double x:Key="OperatorPanelChevronFontSizeMedium">10</x:Double>
<x:Double x:Key="OperatorPanelButtonRowSizeSmall">44</x:Double>
<x:Double x:Key="OperatorPanelFontSizeSmall">12</x:Double>
<x:Double x:Key="OperatorPanelGlyphFontSizeSmall">16</x:Double>
<x:Double x:Key="OperatorPanelChevronFontSizeSmall">12</x:Double>
<x:Double x:Key="CaptionFontSize">12</x:Double>
<x:Double x:Key="BodyFontSize">14</x:Double>
<x:Double x:Key="TitleFontSize">24</x:Double>
<x:Double x:Key="BodyStrongFontSize">14</x:Double>
<FontWeight x:Key="BodyStrongFontWeight">SemiBold</FontWeight>
<!-- Hamburger button heights -->
<x:Double x:Key="HamburgerHeight">48</x:Double>
<GridLength x:Key="HamburgerHeightGridLength">48</GridLength>
<x:Double x:Key="IconOnlySubtleButtonHeight">32</x:Double>
<x:Double x:Key="CalcButtonCaptionSize">34</x:Double>
<x:Double x:Key="CalcButtonTextIconCaptionSize">38</x:Double>
<x:Double x:Key="CalcStandardOperatorCaptionSizeExtraLarge">48</x:Double>
<x:Double x:Key="CalcStandardOperatorCaptionSizeLarge">24</x:Double>
<!-- Numpad Standard/Scientific in Fill/Full -->
<x:Double x:Key="CalcStandardOperatorCaptionSize">20</x:Double>
<x:Double x:Key="CalcStandardOperatorTextIconCaptionSize">22</x:Double>
<x:Double x:Key="CalcStandardOperatorCaptionSizeSmall">15</x:Double>
<x:Double x:Key="CalcStandardOperatorCaptionSizeTiny">12</x:Double>
<!-- Standard Operators Standard/Scientific in Fill/Full -->
<x:Double x:Key="CalcOperatorCaptionSize">14</x:Double>
<x:Double x:Key="CalcOperatorCaptionSizeSmall">12</x:Double>
<x:Double x:Key="CalcOperatorTextIconCaptionSize">16</x:Double>
<!-- White and black color brushes used for the Utils::GetContrastColor -->
<SolidColorBrush x:Key="WhiteBrush" Color="White"/>
<SolidColorBrush x:Key="BlackBrush" Color="Black"/>
<primitives:CornerRadiusFilterConverter x:Key="CornerRadiusTopLeftToDoubleConverter" Filter="TopLeftValue"/>
<!-- Base style for calc buttons -->
<Style x:Key="CalcButtonStyle"
BasedOn="{StaticResource DefaultButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="MinWidth" Value="24"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="MinHeight" Value="12"/>
<Setter Property="Margin" Value="1"/>
<Setter Property="Background" Value="{ThemeResource CalcButtonFillColorDefaultBrush}"/>
<Setter Property="Foreground" Value="{ThemeResource CalcButtonTextFillColorDefaultBrush}"/>
<Setter Property="HoverBackground" Value="{ThemeResource CalcButtonFillColorHoverBrush}"/>
<Setter Property="HoverForeground" Value="{ThemeResource CalcButtonTextFillColorHoverBrush}"/>
<Setter Property="PressBackground" Value="{ThemeResource CalcButtonFillColorPressedBrush}"/>
<Setter Property="PressForeground" Value="{ThemeResource CalcButtonTextFillColorPressedBrush}"/>
<Setter Property="DisabledBackground" Value="{ThemeResource CalcButtonFillColorDisabledBrush}"/>
<Setter Property="DisabledForeground" Value="{ThemeResource CalcButtonTextFillColorDisabledBrush}"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="FontSize" Value="{StaticResource CalcButtonCaptionSize}"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ContentPresenter x:Name="ContentPresenter"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
contract7NotPresent:CornerRadius="{ThemeResource ControlCornerRadius}"
contract7Present:BackgroundSizing="{TemplateBinding BackgroundSizing}"
contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
muxc:AnimatedIcon.State="Normal"
AutomationProperties.AccessibilityView="Raw"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}">
<contract7Present:ContentPresenter.BackgroundTransition>
<contract7Present:BrushTransition Duration="0:0:0.083"/>
</contract7Present:ContentPresenter.BackgroundTransition>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding HoverBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushPointerOver}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding HoverForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<Setter Target="ContentPresenter.(muxc:AnimatedIcon.State)" Value="PointerOver"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PressBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushPressed}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PressForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<Setter Target="ContentPresenter.(muxc:AnimatedIcon.State)" Value="Pressed"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding DisabledBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushDisabled}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding DisabledForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<!-- DisabledVisual Should be handled by the control, not the animated icon. -->
<Setter Target="ContentPresenter.(muxc:AnimatedIcon.State)" Value="Normal"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</ContentPresenter>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="NumericButtonStyle"
BasedOn="{StaticResource CalcButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontWeight" Value="Normal"/>
</Style>
<Style x:Key="NumericButtonStyle10"
BasedOn="{StaticResource NumericButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontSize" Value="10"/>
</Style>
<Style x:Key="NumericButtonStyle12"
BasedOn="{StaticResource NumericButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontSize" Value="12"/>
</Style>
<Style x:Key="NumericButtonStyle14"
BasedOn="{StaticResource NumericButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontSize" Value="14"/>
</Style>
<Style x:Key="NumericButtonStyle16"
BasedOn="{StaticResource NumericButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontSize" Value="16"/>
</Style>
<Style x:Key="NumericButtonStyle18"
BasedOn="{StaticResource NumericButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontSize" Value="18"/>
</Style>
<Style x:Key="NumericButtonStyle24"
BasedOn="{StaticResource NumericButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontSize" Value="24"/>
</Style>
<Style x:Key="NumericButtonStyle28"
BasedOn="{StaticResource NumericButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontSize" Value="28"/>
</Style>
<Style x:Key="NumericButtonStyle34"
BasedOn="{StaticResource NumericButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontSize" Value="34"/>
</Style>
<Style x:Key="NumericButtonStyle38"
BasedOn="{StaticResource NumericButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontSize" Value="38"/>
</Style>
<Style x:Key="NumericButtonStyle46"
BasedOn="{StaticResource NumericButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontSize" Value="46"/>
</Style>
<Style x:Key="NumericButtonStyle48"
BasedOn="{StaticResource NumericButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontSize" Value="48"/>
</Style>
<Style x:Key="SymbolOperatorKeypadButtonStyle"
BasedOn="{StaticResource NumericButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontFamily" Value="{StaticResource CalculatorFontFamily}"/>
<Setter Property="FontSize" Value="{StaticResource CalcOperatorCaptionSize}"/>
</Style>
<Style x:Key="OperatorButtonStyle"
BasedOn="{StaticResource CalcButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="Background" Value="{ThemeResource CalcButtonAltFillColorDefaultBrush}"/>
<Setter Property="HoverBackground" Value="{ThemeResource CalcButtonAltFillColorHoverBrush}"/>
<Setter Property="PressBackground" Value="{ThemeResource CalcButtonAltFillColorPressedBrush}"/>
<Setter Property="DisabledBackground" Value="{ThemeResource CalcButtonAltFillColorDisabledBrush}"/>
<Setter Property="FontSize" Value="{StaticResource CalcOperatorCaptionSize}"/>
</Style>
<Style x:Key="SymbolOperatorButtonStyle"
BasedOn="{StaticResource OperatorButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="FontFamily" Value="{StaticResource CalculatorFontFamily}"/>
</Style>
<Style x:Key="ParenthesisCalcButtonStyle"
BasedOn="{StaticResource OperatorButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Controls:CalculatorButton">
<Grid x:Name="RootGrid">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding HoverBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushPointerOver}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding HoverForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ParenthesisCount" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding HoverForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<Setter Target="ContentPresenter.(muxc:AnimatedIcon.State)" Value="PointerOver"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PressBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushPressed}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PressForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ParenthesisCount" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PressForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<Setter Target="ContentPresenter.(muxc:AnimatedIcon.State)" Value="Pressed"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding DisabledBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushDisabled}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding DisabledForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ParenthesisCount" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding DisabledForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<!-- DisabledVisual Should be handled by the control, not the animated icon. -->
<Setter Target="ContentPresenter.(muxc:AnimatedIcon.State)" Value="Normal"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<ContentPresenter x:Name="ContentPresenter"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
contract7NotPresent:CornerRadius="{ThemeResource ControlCornerRadius}"
contract7Present:BackgroundSizing="{TemplateBinding BackgroundSizing}"
contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
muxc:AnimatedIcon.State="Normal"
AutomationProperties.AccessibilityView="Raw"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}">
<contract7Present:ContentPresenter.BackgroundTransition>
<contract7Present:BrushTransition Duration="0:0:0.083"/>
</contract7Present:ContentPresenter.BackgroundTransition>
</ContentPresenter>
<TextBlock x:Name="ParenthesisCount"
Margin="18,8,0,-8"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="{TemplateBinding MinHeight}"
FontWeight="SemiBold"
AutomationProperties.AccessibilityView="Raw"
Text="{TemplateBinding Tag}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="AccentEmphasizedCalcButtonStyle"
BasedOn="{StaticResource AccentButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="MinWidth" Value="24"/>
<Setter Property="MinHeight" Value="12"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Margin" Value="1"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="FontFamily" Value="{StaticResource CalculatorFontFamily}"/>
<Setter Property="FontSize" Value="{StaticResource CalcOperatorCaptionSize}"/>
<Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundTransparentBrush}"/>
<Setter Property="BorderThickness" Value="{ThemeResource ControlBorderThemeThickness}"/>
</Style>
<Style x:Key="EmphasizedCalcButtonStyle"
BasedOn="{StaticResource SymbolOperatorButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="HoverBackground" Value="{ThemeResource AppControlHighlightCalcButtonHoverBrush}"/>
<Setter Property="HoverForeground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
<Setter Property="PressBackground" Value="{ThemeResource SystemControlHighlightAccentBrush}"/>
<Setter Property="PressForeground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
</Style>
<Style x:Key="AccentEmphasizedOperatorCalcButtonStyle"
BasedOn="{StaticResource OperatorButtonStyle}"
TargetType="Controls:CalculatorButton">
<Setter Property="HoverBackground" Value="{ThemeResource AppControlHighlightCalcButtonHoverBrush}"/>
<Setter Property="HoverForeground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
<Setter Property="PressBackground" Value="{ThemeResource SystemControlHighlightAccentBrush}"/>
<Setter Property="PressForeground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
<Setter Property="Background" Value="{ThemeResource AppControlHighlightCalcButtonBrush}"/>
</Style>
<!-- RESULTS -->
<Style x:Key="ResultsScroller" TargetType="ScrollViewer">
<Setter Property="HorizontalScrollMode" Value="Disabled"/>
<Setter Property="VerticalScrollMode" Value="Disabled"/>
<Setter Property="VerticalScrollBarVisibility" Value="Disabled"/>
<Setter Property="HorizontalScrollBarVisibility" Value="Disabled"/>
<Setter Property="IsHitTestVisible" Value="True"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Right"/>
</Style>
<Style x:Key="ResultsScrollerSnapped"
BasedOn="{StaticResource ResultsScroller}"
TargetType="ScrollViewer">
<Setter Property="HorizontalScrollMode" Value="Enabled"/>
<Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
<Setter Property="IsHitTestVisible" Value="True"/>
<Setter Property="ZoomMode" Value="Disabled"/>
</Style>
<Style x:Key="CalculationResultStyle" TargetType="Controls:CalculationResult">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{ThemeResource SystemControlPageTextBaseHighBrush}"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Right"/>
<Setter Property="VerticalContentAlignment" Value="Top"/>
<Setter Property="IsTextScaleFactorEnabled" Value="False"/>
<Setter Property="UseSystemFocusVisuals" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Controls:CalculationResult">
<Grid x:Name="Border"
Background="{TemplateBinding Background}"
FlowDirection="LeftToRight">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="12"/>
<ColumnDefinition/>
<ColumnDefinition Width="12"/>
</Grid.ColumnDefinitions>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="ActiveStates">
<VisualState x:Name="Active">
<VisualState.Setters>
<Setter Target="NormalOutput.FontWeight" Value="SemiBold"/>
<Setter Target="NormalOutput.IsTextSelectionEnabled" Value="True"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Normal"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<ScrollViewer x:Name="TextContainer"
Grid.Column="1"
Padding="0,0,0,0"
Style="{ThemeResource ResultsScrollerSnapped}"
AutomationProperties.AccessibilityView="Raw">
<TextBlock x:Name="NormalOutput"
Margin="{TemplateBinding DisplayMargin}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="{TemplateBinding Foreground}"
FontSize="{TemplateBinding FontSize}"
FontWeight="Light"
AutomationProperties.AccessibilityView="Raw"
Text="{TemplateBinding DisplayValue}"
TextAlignment="{TemplateBinding HorizontalContentAlignment}"
TextWrapping="NoWrap"/>
</ScrollViewer>
<HyperlinkButton x:Name="ScrollLeft"
Grid.Column="0"
Width="20"
MinWidth="20"
MinHeight="24"
Margin="-4,0,-4,0"
Padding="0,-3,0,4"
VerticalAlignment="Top"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Foreground="{ThemeResource SystemControlForegroundAccentBrush}"
BorderThickness="0"
AutomationProperties.AutomationId="CalculationResultScrollLeft"
AutomationProperties.Name="{utils:ResourceString Name=CalculationResultScrollLeft/[using:Windows.UI.Xaml.Automation]AutomationProperties/Name}"
Visibility="Collapsed">
<FontIcon x:Name="ScrollLeftText"
FontFamily="{ThemeResource CalculatorFontFamily}"
FontSize="12"
Glyph=""/>
</HyperlinkButton>
<HyperlinkButton x:Name="ScrollRight"
Grid.Column="2"
Width="20"
MinWidth="20"
MinHeight="24"
Margin="-4,0,-4,0"
Padding="0,-3,0,4"
VerticalAlignment="Top"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Foreground="{ThemeResource SystemControlForegroundAccentBrush}"
BorderThickness="0"
AutomationProperties.AutomationId="CalculationResultScrollRight"
AutomationProperties.Name="{utils:ResourceString Name=CalculationResultScrollRight/[using:Windows.UI.Xaml.Automation]AutomationProperties/Name}"
Visibility="Collapsed">
<FontIcon x:Name="ScrollRightText"
FontFamily="{ThemeResource CalculatorFontFamily}"
FontSize="12"
Glyph=""/>
</HyperlinkButton>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<contract7NotPresent:Style x:Key="ConditionalCalculationResultStyle"
BasedOn="{StaticResource CalculationResultStyle}"
TargetType="Controls:CalculationResult"/>
<contract7Present:Style x:Key="ConditionalCalculationResultStyle"
BasedOn="{StaticResource CalculationResultStyle}"
TargetType="Controls:CalculationResult">
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}"/>
</contract7Present:Style>
<Style x:Key="OperatorPanelButtonSmallStyle"
BasedOn="{StaticResource OperatorPanelButtonStyle}"
TargetType="Controls:OperatorPanelButton">
<Setter Property="FontSize" Value="{StaticResource OperatorPanelFontSizeSmall}"/>
<Setter Property="GlyphFontSize" Value="{StaticResource OperatorPanelGlyphFontSizeSmall}"/>
<Setter Property="ChevronFontSize" Value="{StaticResource OperatorPanelChevronFontSizeSmall}"/>
</Style>
<Style x:Key="OperatorPanelButtonMediumStyle"
BasedOn="{StaticResource OperatorPanelButtonStyle}"
TargetType="Controls:OperatorPanelButton">
<Setter Property="FontSize" Value="{StaticResource OperatorPanelFontSizeMedium}"/>
<Setter Property="GlyphFontSize" Value="{StaticResource OperatorPanelGlyphFontSizeMedium}"/>
<Setter Property="ChevronFontSize" Value="{StaticResource OperatorPanelChevronFontSizeMedium}"/>
</Style>
<Style x:Key="OperatorPanelButtonLargeStyle"
BasedOn="{StaticResource OperatorPanelButtonStyle}"
TargetType="Controls:OperatorPanelButton">
<Setter Property="FontSize" Value="{StaticResource OperatorPanelFontSizeLarge}"/>
<Setter Property="GlyphFontSize" Value="{StaticResource OperatorPanelGlyphFontSizeLarge}"/>
<Setter Property="ChevronFontSize" Value="{StaticResource OperatorPanelChevronFontSizeLarge}"/>
</Style>
<Style x:Key="OperatorPanelButtonStyle"
BasedOn="{StaticResource DefaultToggleButtonStyle}"
TargetType="Controls:OperatorPanelButton">
<Setter Property="FontSize" Value="{StaticResource CaptionFontSize}"/>
<Setter Property="GlyphFontSize" Value="{StaticResource CaptionFontSize}"/>
<Setter Property="ChevronFontSize" Value="{StaticResource CaptionFontSize}"/>
<Setter Property="Padding" Value="8,0,8,0"/>
<Setter Property="MinWidth" Value="32"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{ThemeResource ToggleButtonForeground}"/>
<Setter Property="Background" Value="{ThemeResource SubtleFillColorTransparentBrush}"/>
<Setter Property="BorderThickness" Value="{ThemeResource ControlBorderThemeThickness}"/>
<Setter Property="Margin" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Controls:OperatorPanelButton">
<ContentPresenter x:Name="ContentPresenter"
Padding="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
FontSize="{TemplateBinding FontSize}"
FontWeight="Normal"
contract7NotPresent:CornerRadius="{ThemeResource ControlCornerRadius}"
contract7Present:BackgroundSizing="{TemplateBinding BackgroundSizing}"
contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
AutomationProperties.AccessibilityView="Raw"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}">
<contract7Present:ContentPresenter.BackgroundTransition>
<contract7Present:BrushTransition Duration="0:0:0.083"/>
</contract7Present:ContentPresenter.BackgroundTransition>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleFillColorSecondaryBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushPointerOver}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextFillColorPrimaryBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleFillColorTertiaryBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushPressed}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextFillColorSecondaryBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleFillColorDisabledBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextFillColorDisabledBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushDisabled}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Checked">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppControlBackgroundTertiaryBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextFillColorSecondaryBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrush}"/>
</ObjectAnimationUsingKeyFrames>
<contract7Present:ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BackgroundSizing">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonCheckedStateBackgroundSizing}"/>
</contract7Present:ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="CheckedPointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleFillColorTertiaryBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushCheckedPointerOver}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextFillColorSecondaryBrush}"/>
</ObjectAnimationUsingKeyFrames>
<contract7Present:ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BackgroundSizing">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonCheckedStateBackgroundSizing}"/>
</contract7Present:ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="CheckedPressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SubtleFillColorTertiaryBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextFillColorSecondaryBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushCheckedPressed}"/>
</ObjectAnimationUsingKeyFrames>
<contract7Present:ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BackgroundSizing">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonCheckedStateBackgroundSizing}"/>
</contract7Present:ObjectAnimationUsingKeyFrames>