Skip to content

Commit a9a96da

Browse files
authored
Merge pull request #338 from GID0317/Gallery-Fix-Typography-page
Gallery-Fix: Typography page unusual bright brush card fix
2 parents 042a628 + 2243f54 commit a9a96da

3 files changed

Lines changed: 21 additions & 15 deletions

File tree

source/iNKORE.UI.WPF.Modern.Gallery/Controls/UserControls/TypographyControl.xaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
xmlns:local="clr-namespace:iNKORE.UI.WPF.Modern.Gallery.Controls.UserControls"
1010
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
1111
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
12-
mc:Ignorable="d">
12+
mc:Ignorable="d"
13+
Background="Transparent">
14+
<UserControl.Template>
15+
<ControlTemplate TargetType="UserControl">
16+
<ContentPresenter />
17+
</ControlTemplate>
18+
</UserControl.Template>
1319

1420
<Grid MinHeight="68" Background="Transparent">
1521
<Border

source/iNKORE.UI.WPF.Modern.Gallery/Pages/Controls/Foundation/Design/TypographyPage.xaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -188,33 +188,33 @@
188188
<TextBlock
189189
Margin="16,0,0,0"
190190
Style="{DynamicResource CaptionTextBlockStyle}"
191-
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
191+
Foreground="{DynamicResource {x:Static ui:ThemeKeys.TextFillColorSecondaryBrushKey}}"
192192
Text="Example" />
193193
<TextBlock
194194
Grid.Column="1"
195195
Style="{DynamicResource CaptionTextBlockStyle}"
196-
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
196+
Foreground="{DynamicResource {x:Static ui:ThemeKeys.TextFillColorSecondaryBrushKey}}"
197197
Text="Variable Font" />
198198
<TextBlock
199199
Grid.Column="2"
200200
Style="{DynamicResource CaptionTextBlockStyle}"
201-
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
201+
Foreground="{DynamicResource {x:Static ui:ThemeKeys.TextFillColorSecondaryBrushKey}}"
202202
Text="Size/Line height" />
203203
<TextBlock
204204
Grid.Column="3"
205205
Style="{DynamicResource CaptionTextBlockStyle}"
206-
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
206+
Foreground="{DynamicResource {x:Static ui:ThemeKeys.TextFillColorSecondaryBrushKey}}"
207207
Text="Style" />
208208
<TextBlock
209209
Grid.Column="4"
210210
Style="{DynamicResource CaptionTextBlockStyle}"
211-
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
211+
Foreground="{DynamicResource {x:Static ui:ThemeKeys.TextFillColorSecondaryBrushKey}}"
212212
Text="Usage (XAML)" FontWeight="SemiBold" />
213213
</Grid>
214214

215215
<uc:TypographyControl
216216
HorizontalAlignment="Stretch"
217-
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
217+
Background="{DynamicResource {x:Static ui:ThemeKeys.CardBackgroundFillColorDefaultBrushKey}}"
218218
Example="Caption"
219219
ExampleStyle="{DynamicResource CaptionTextBlockStyle}"
220220
VariableFont="Small, Regular"
@@ -231,7 +231,7 @@
231231
Weight="400" />
232232

233233
<uc:TypographyControl
234-
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
234+
Background="{DynamicResource {x:Static ui:ThemeKeys.CardBackgroundFillColorDefaultBrushKey}}"
235235
Example="Body Strong"
236236
ExampleStyle="{DynamicResource BodyStrongTextBlockStyle}"
237237
VariableFont="Text, SemiBold"
@@ -248,7 +248,7 @@
248248
Weight="600" />
249249

250250
<uc:TypographyControl
251-
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
251+
Background="{DynamicResource {x:Static ui:ThemeKeys.CardBackgroundFillColorDefaultBrushKey}}"
252252
Example="Title"
253253
ExampleStyle="{DynamicResource TitleTextBlockStyle}"
254254
VariableFont="Display, SemiBold"
@@ -265,7 +265,7 @@
265265
Weight="600" />
266266

267267
<uc:TypographyControl
268-
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
268+
Background="{DynamicResource {x:Static ui:ThemeKeys.CardBackgroundFillColorDefaultBrushKey}}"
269269
Example="Display"
270270
ExampleStyle="{DynamicResource DisplayTextBlockStyle}"
271271
VariableFont="Display, SemiBold"

source/iNKORE.UI.WPF.Modern.Gallery/Pages/Controls/Foundation/Design/TypographyPage.xaml.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,6 @@ private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e
219219
e.Handled = true;
220220
}
221221

222-
private void UpdateExampleCode()
223-
{
224-
Example1.Xaml = Example1Xaml;
225-
}
226-
227222
// Button click handlers for typography info buttons
228223
private void ShowTypographyButtonClick1(object sender, RoutedEventArgs e)
229224
{
@@ -256,6 +251,11 @@ private void ShowTypographyButtonClick5(object sender, RoutedEventArgs e)
256251
System.Windows.MessageBox.Show("Display: Display, SemiBold - 68/92 epx\nStyle: DisplayTextBlockStyle", "Typography Info", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information);
257252
}
258253

254+
private void UpdateExampleCode()
255+
{
256+
Example1.Xaml = Example1Xaml;
257+
}
258+
259259
string Example1Xaml => @"
260260
<TextBlock Text=""Caption"" Style=""{StaticResource {x:Static ui:ThemeKeys.CaptionTextBlockStyleKey}}""/>
261261
<TextBlock Text=""Body"" Style=""{StaticResource {x:Static ui:ThemeKeys.BodyTextBlockStyleKey}}""/>

0 commit comments

Comments
 (0)