forked from adiprisacariu/ModernWpf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.xaml
131 lines (117 loc) · 7.34 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
<Application
x:Class="ModernWpf.SampleApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:local="clr-namespace:ModernWpf.SampleApp"
xmlns:common="clr-namespace:ModernWpf.SampleApp.Common"
xmlns:sc="clr-namespace:SamplesCommon;assembly=SamplesCommon"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:presets="clr-namespace:ModernWpf.SampleApp.Presets"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ui:ThemeResources CanBeAccessedAcrossThreads="{x:Static local:App.IsMultiThreaded}">
<ui:ThemeResources.ThemeDictionaries>
<ResourceDictionary x:Key="Light" ui:ThemeDictionary.Key="Light">
<ResourceDictionary.MergedDictionaries>
<presets:ColorPresetResources TargetTheme="Light" />
<presets:ShapePresetResources />
</ResourceDictionary.MergedDictionaries>
<SolidColorBrush x:Key="AppBackgroundBrush" Color="#FFF1F1F1" />
<SolidColorBrush x:Key="AppContentBackgroundBrush" Color="{StaticResource SystemAltHighColor}" />
<SolidColorBrush x:Key="CustomThemeBrush" Color="Red" />
</ResourceDictionary>
<ResourceDictionary x:Key="Dark" ui:ThemeDictionary.Key="Dark">
<ResourceDictionary.MergedDictionaries>
<presets:ColorPresetResources TargetTheme="Dark" />
<presets:ShapePresetResources />
</ResourceDictionary.MergedDictionaries>
<SolidColorBrush x:Key="AppBackgroundBrush" Color="#FF232323" />
<SolidColorBrush x:Key="AppContentBackgroundBrush" Color="#FF282828" />
<SolidColorBrush x:Key="CustomThemeBrush" Color="Yellow" />
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast" ui:ThemeDictionary.Key="HighContrast">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="HighContrast.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</ui:ThemeResources.ThemeDictionaries>
</ui:ThemeResources>
<ui:XamlControlsResources />
<!-- Font Overrides -->
<!--<sc:FontOverrides FontFamily="Comic Sans MS" />-->
<!--<ResourceDictionary>
<FontFamily x:Key="DefaultFontFamily">Comic Sans MS</FontFamily>
<StaticResource x:Key="{x:Static SystemFonts.MessageFontFamilyKey}" ResourceKey="DefaultFontFamily" />
<StaticResource x:Key="ContentControlThemeFontFamily" ResourceKey="DefaultFontFamily" />
<StaticResource x:Key="PivotHeaderItemFontFamily" ResourceKey="DefaultFontFamily" />
<StaticResource x:Key="PivotTitleFontFamily" ResourceKey="DefaultFontFamily" />
</ResourceDictionary>-->
</ResourceDictionary.MergedDictionaries>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<sc:EnumValuesConverter x:Key="EnumValuesConverter" />
<sc:ColorToBrushConverter x:Key="ColorToBrushConverter" />
<common:BrushToColorConverter x:Key="BrushToColorConverter" />
<common:InverseAppThemeConverter x:Key="InverseAppThemeConverter" />
<common:BooleanToValueConverter x:Key="booleanToValueConverter" />
<common:CornerRadiusToDoubleConverter x:Key="CornerRadiusToDoubleConverter" />
<Style TargetType="ScrollViewer" BasedOn="{StaticResource DefaultScrollViewerStyle}">
<Setter Property="sc:AutoPanningMode.IsEnabled" Value="True" />
</Style>
<Style x:Key="OptionsPanelStyle" TargetType="ui:SimpleStackPanel">
<Setter Property="Spacing" Value="12" />
<Style.Resources>
<Style TargetType="ComboBox" BasedOn="{StaticResource {x:Type ComboBox}}">
<Setter Property="MinWidth" Value="200" />
</Style>
<Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="MinWidth" Value="200" />
</Style>
<Style TargetType="DatePicker" BasedOn="{StaticResource {x:Type DatePicker}}">
<Setter Property="MinWidth" Value="200" />
</Style>
</Style.Resources>
</Style>
<Style x:Key="OutputTextBlockStyle" BasedOn="{StaticResource BodyTextBlockStyle}" TargetType="TextBlock">
<Setter Property="Margin" Value="8,8,0,0" />
</Style>
<Thickness x:Key="ControlPageContentMargin">24,0,24,20</Thickness>
<Style x:Key="ControlPageContentPanelStyle" TargetType="ui:SimpleStackPanel">
<Setter Property="Margin" Value="{StaticResource ControlPageContentMargin}" />
<Setter Property="Spacing" Value="16" />
</Style>
<Style x:Key="ScrollableContentDialogStyle" TargetType="ui:ContentDialog">
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Style.Resources>
<Thickness x:Key="ContentDialogContentMargin">24,0,24,0</Thickness>
<Thickness x:Key="ContentDialogContentScrollViewerMargin">-24,0,-24,0</Thickness>
<Thickness x:Key="ContentDialogTitleMargin">24,0,24,12</Thickness>
</Style.Resources>
</Style>
<Style x:Key="ControlExampleFullStyle" TargetType="sc:ControlExample">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="MaxContentWidth" Value="{x:Static sys:Double.PositiveInfinity}" />
</Style>
<Style x:Key="RichTextBlockStyle" TargetType="RichTextBox" BasedOn="{StaticResource DefaultRichTextBoxStyle}">
<Setter Property="Padding" Value="0" />
<Setter Property="IsReadOnly" Value="True" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RichTextBox">
<ScrollViewer x:Name="PART_ContentHost" />
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Resources>
<Style TargetType="Paragraph">
<Setter Property="Margin" Value="0" />
</Style>
</Style.Resources>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>