|
3 | 3 |
|
4 | 4 | <Styles.Resources> |
5 | 5 | <ResourceDictionary> |
6 | | - <ResourceDictionary.ThemeDictionaries> |
7 | | - <ResourceDictionary x:Key='Light'> |
8 | | - <SolidColorBrush x:Key='AppBackground' Color="{OnPlatform White, iOS=Black}"></SolidColorBrush> |
9 | | - <SolidColorBrush x:Key='PageBackground'>White</SolidColorBrush> |
10 | | - </ResourceDictionary> |
11 | | - <ResourceDictionary x:Key='Dark'> |
12 | | - <SolidColorBrush x:Key='AppBackground'>Black</SolidColorBrush> |
13 | | - <SolidColorBrush x:Key='PageBackground'>Black</SolidColorBrush> |
14 | | - </ResourceDictionary> |
15 | | - </ResourceDictionary.ThemeDictionaries> |
| 6 | + <ResourceDictionary.MergedDictionaries> |
| 7 | + <ResourceInclude Source="Theme/Default/Colors.axaml"></ResourceInclude> |
| 8 | + </ResourceDictionary.MergedDictionaries> |
16 | 9 | </ResourceDictionary> |
17 | 10 | </Styles.Resources> |
18 | 11 |
|
19 | | - <Style Selector="NavigationBar"> |
20 | | - <Setter Property="Template"> |
21 | | - <ControlTemplate TargetType="NavigationBar"> |
22 | | - <Border Background="{TemplateBinding Background}" |
23 | | - Padding="{TemplateBinding Padding}" |
24 | | - Margin="{TemplateBinding Margin}" |
25 | | - MinHeight="35"> |
26 | | - <Grid RowDefinitions="Auto,*"> |
27 | | - <Border Grid.Row="0" |
28 | | - Height="{TemplateBinding TopSafeSpace}" |
29 | | - IsVisible="{TemplateBinding ApplyTopSafePadding}"></Border> |
30 | | - <Button Name="PART_ActionButton" |
31 | | - HorizontalAlignment="Left" |
32 | | - VerticalAlignment="Center" |
33 | | - HorizontalContentAlignment="Center" |
34 | | - VerticalContentAlignment="Center" |
35 | | - Width="35" |
36 | | - Grid.Row="1"> |
37 | | - </Button> |
38 | | - <TransitioningContentControl Grid.Row="1" Name="PART_Header" HorizontalAlignment="Center" VerticalAlignment="Center" /> |
39 | | - <TransitioningContentControl Grid.Row="1" Name="PART_Items" HorizontalAlignment="Right" VerticalAlignment="Center" /> |
40 | | - </Grid> |
41 | | - </Border> |
42 | | - </ControlTemplate> |
43 | | - </Setter> |
44 | | - </Style> |
45 | | - |
46 | | - <Style Selector="ShellView"> |
47 | | - <Setter Property="Template"> |
48 | | - <ControlTemplate> |
49 | | - <Panel Background="{TemplateBinding Background}"> |
50 | | - <SplitView Name="PART_SplitView" DisplayMode="Inline"> |
51 | | - <SplitView.Pane> |
52 | | - <SideMenu Name="PART_SideMenu" |
53 | | - SelectedItem="{TemplateBinding SideMenuSelectedItem, Mode=TwoWay}" |
54 | | - Header="{TemplateBinding SideMenuHeader}" |
55 | | - Footer="{TemplateBinding SideMenuFooter}" |
56 | | - Contents="{TemplateBinding SideMenuContents}" |
57 | | - ContentsTemplate="{TemplateBinding SideMenuContentsTemplate}"> |
58 | | - </SideMenu> |
59 | | - </SplitView.Pane> |
60 | | - |
61 | | - <Grid RowDefinitions="Auto,*,Auto"> |
62 | | - <NavigationBar Name="PART_NavigationBar" |
63 | | - TopSafePadding="{TemplateBinding TopSafePadding}" |
64 | | - TopSafeSpace="{TemplateBinding TopSafeSpace}" |
65 | | - ApplyTopSafePadding="{TemplateBinding ApplyTopSafePadding}"/> |
66 | | - <StackContentView Name="PART_ContentView" |
67 | | - Grid.Row="1" |
68 | | - PageTransition="{TemplateBinding DefaultPageTransition}"></StackContentView> |
69 | | - <Border Grid.Row="2" |
70 | | - IsVisible="{TemplateBinding ApplyBottomSafePadding}" |
71 | | - Height="{TemplateBinding BottomSafeSpace}"> |
72 | | - <Border.Styles> |
73 | | - <Style Selector="Border[IsVisible=True]"> |
74 | | - <Setter Property="RenderTransform" Value="scaleY(1)"></Setter> |
75 | | - </Style> |
76 | | - <Style Selector="Border[IsVisible=False]"> |
77 | | - <Setter Property="RenderTransform" Value="scaleY(0)"></Setter> |
78 | | - </Style> |
79 | | - </Border.Styles> |
80 | | - </Border> |
81 | | - </Grid> |
82 | | - </SplitView> |
83 | | - |
84 | | - <Rectangle IsVisible="{Binding ElementName=PART_Modal, Path=HasContent}" |
85 | | - Opacity="0.5"> |
86 | | - <Rectangle.Fill> |
87 | | - <VisualBrush |
88 | | - TileMode="Tile" |
89 | | - SourceRect="0,0,8,8" |
90 | | - DestinationRect="0,0,8,8" |
91 | | - Stretch="UniformToFill"> |
92 | | - <VisualBrush.Visual> |
93 | | - <Canvas Width="8" Height="8"> |
94 | | - <Rectangle Fill="Black" Width="8" Height="8"></Rectangle> |
95 | | - <Line StartPoint="0,0" EndPoint="8,8" Stroke="#55555555" StrokeThickness="1" /> |
96 | | - <Line StartPoint="0,8" EndPoint="8,0" Stroke="#55555555" StrokeThickness="1" /> |
97 | | - </Canvas> |
98 | | - </VisualBrush.Visual> |
99 | | - </VisualBrush> |
100 | | - </Rectangle.Fill> |
101 | | - </Rectangle> |
102 | | - |
103 | | - <StackContentView Name="PART_Modal" |
104 | | - IsVisible="{Binding ElementName=PART_Modal, Path=HasContent}" |
105 | | - PageTransition="{TemplateBinding ModalPageTransition}"> |
106 | | - </StackContentView> |
107 | | - </Panel> |
108 | | - </ControlTemplate> |
109 | | - </Setter> |
110 | | - <Setter Property="SideMenuContentsTemplate"> |
111 | | - <DataTemplate> |
112 | | - <ContentPresenter Content="{Binding .}"></ContentPresenter> |
113 | | - </DataTemplate> |
114 | | - </Setter> |
115 | | - </Style> |
116 | | - |
117 | | - <Style Selector="SideMenu"> |
118 | | - <Setter Property="Template"> |
119 | | - <ControlTemplate> |
120 | | - <Grid RowDefinitions="Auto,*,Auto"> |
121 | | - <ContentPresenter Name="PART_Header" |
122 | | - ContentTemplate="{TemplateBinding HeaderTemplate}" |
123 | | - Content="{TemplateBinding Header}"></ContentPresenter> |
124 | | - <ScrollViewer Grid.Row="1"> |
125 | | - <StackPanel Orientation="Vertical"> |
126 | | - <ListBox Name="PART_Items" |
127 | | - ItemsSource="{TemplateBinding Items}" |
128 | | - SelectedItem="{TemplateBinding SelectedItem, Mode=TwoWay}"> |
129 | | - <ListBox.ItemsPanel> |
130 | | - <ItemsPanelTemplate> |
131 | | - <StackPanel></StackPanel> |
132 | | - </ItemsPanelTemplate> |
133 | | - </ListBox.ItemsPanel> |
134 | | - <ListBox.ItemTemplate> |
135 | | - <DataTemplate> |
136 | | - <StackPanel Orientation="Horizontal" Height="22" Spacing="8"> |
137 | | - <Image Source="{Binding Icon}" |
138 | | - IsVisible="{Binding !!Icon}" |
139 | | - VerticalAlignment="Center"></Image> |
140 | | - <TextBlock Text="{Binding Title}" |
141 | | - VerticalAlignment="Center"></TextBlock> |
142 | | - </StackPanel> |
143 | | - </DataTemplate> |
144 | | - </ListBox.ItemTemplate> |
145 | | - </ListBox> |
146 | | - <ItemsControl Name="PART_Contents" |
147 | | - ItemsSource="{TemplateBinding Contents}" |
148 | | - ItemTemplate="{TemplateBinding ContentsTemplate}" /> |
149 | | - </StackPanel> |
150 | | - </ScrollViewer> |
151 | | - <ContentPresenter Grid.Row="2" |
152 | | - Name="PART_Footer" |
153 | | - ContentTemplate="{TemplateBinding FooterTemplate}" |
154 | | - Content="{TemplateBinding Footer}"></ContentPresenter> |
155 | | - </Grid> |
156 | | - </ControlTemplate> |
157 | | - </Setter> |
158 | | - </Style> |
159 | | - |
160 | | - <Style Selector="Button.BackButton"> |
161 | | - <Setter Property="Template"> |
162 | | - <ControlTemplate> |
163 | | - <Viewbox Stretch="UniformToFill"> |
164 | | - <Canvas Width="16" Height="16" Margin="5" Background="#00000000"> |
165 | | - <Line StartPoint="7,2" EndPoint="2,8" StrokeThickness="3" Stroke="{DynamicResource ButtonForeground}"></Line> |
166 | | - <Line StartPoint="2,6" EndPoint="7,12" StrokeThickness="3" Stroke="{DynamicResource ButtonForeground}"></Line> |
167 | | - </Canvas> |
168 | | - </Viewbox> |
169 | | - </ControlTemplate> |
170 | | - </Setter> |
171 | | - </Style> |
172 | | - <Style Selector="Button.SideMenuButton"> |
173 | | - <Setter Property="RenderTransform" Value="rotate(180deg)" /> |
174 | | - <Setter Property="Template"> |
175 | | - <ControlTemplate> |
176 | | - <Viewbox Stretch="UniformToFill"> |
177 | | - <Canvas Width="16" Height="16" Margin="5" Background="#00000000"> |
178 | | - <Line StartPoint="1,4" EndPoint="15,4" StrokeThickness="3" Stroke="{DynamicResource ButtonForeground}"></Line> |
179 | | - <Line StartPoint="1,8" EndPoint="15,8" StrokeThickness="3" Stroke="{DynamicResource ButtonForeground}"></Line> |
180 | | - <Line StartPoint="1,12" EndPoint="15,12" StrokeThickness="3" Stroke="{DynamicResource ButtonForeground}"></Line> |
181 | | - </Canvas> |
182 | | - </Viewbox> |
183 | | - </ControlTemplate> |
184 | | - </Setter> |
185 | | - </Style> |
186 | | - |
187 | | - <Style Selector="Page"> |
188 | | - <Setter Property="Background" Value="{DynamicResource PageBackground}" /> |
189 | | - </Style> |
190 | | - |
191 | | - <Style Selector="ShellView"> |
192 | | - <Setter Property="Background" Value="{DynamicResource AppBackground}" /> |
193 | | - </Style> |
| 12 | + <StyleInclude Source="/Theme/Default/Controls.axaml" /> |
194 | 13 | </Styles> |
0 commit comments