Skip to content

Commit 74b3dd7

Browse files
Merge pull request #3371 from vgromfeld/inAppNotification.allowLightTemplating
Enable light templating in InAppNotification
2 parents f732fc1 + c3e99c1 commit 74b3dd7

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/MSEdgeNotificationStyle.xaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,18 @@
3131
</ResourceDictionary>
3232
</ResourceDictionary.ThemeDictionaries>
3333

34+
<x:Double x:Key="SystemControlMSEdgeNotificationDismissButtonSize">40</x:Double>
35+
<Thickness x:Key="SystemControlMSEdgeNotificationDismissButtonMargin">24,0,0,0</Thickness>
36+
<x:Double x:Key="SystemControlMSEdgeNotificationDismissButtonTranslate">18</x:Double>
37+
<VerticalAlignment x:Key="SystemControlMSEdgeNotificationDismissButtonVerticalAlignment">Center</VerticalAlignment>
38+
<Thickness x:Key="SystemControlMSEdgeNotificationButtonBorderThickness">2</Thickness>
39+
3440
<Style x:Key="DismissTextBlockButtonStyle"
3541
TargetType="ButtonBase">
3642
<Setter Property="Background" Value="{ThemeResource HyperlinkButtonBackground}" />
3743
<Setter Property="Foreground" Value="{ThemeResource ApplicationForegroundThemeBrush}" />
38-
<Setter Property="Width" Value="40" />
39-
<Setter Property="Height" Value="40" />
44+
<Setter Property="Width" Value="{StaticResource SystemControlMSEdgeNotificationDismissButtonSize}" />
45+
<Setter Property="Height" Value="{StaticResource SystemControlMSEdgeNotificationDismissButtonSize}" />
4046
<Setter Property="UseSystemFocusVisuals" Value="True" />
4147
<Setter Property="HighContrastAdjustment" Value="None" />
4248
<Setter Property="Template">
@@ -46,8 +52,8 @@
4652
Margin="{TemplateBinding Padding}"
4753
Background="{TemplateBinding Background}">
4854
<Border x:Name="TextBorder"
49-
BorderBrush="{ThemeResource SystemControlMSEdgeNotificationButtonBorderBrush}"
50-
BorderThickness="2">
55+
BorderThickness="{StaticResource SystemControlMSEdgeNotificationButtonBorderThickness}"
56+
BorderBrush="{ThemeResource SystemControlMSEdgeNotificationButtonBorderBrush}">
5157
<ContentPresenter x:Name="Text"
5258
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
5359
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
@@ -143,11 +149,12 @@
143149

144150
<Button x:Name="PART_DismissButton"
145151
Grid.Column="1"
146-
Margin="24,0,0,0"
152+
Margin="{StaticResource SystemControlMSEdgeNotificationDismissButtonMargin}"
147153
AutomationProperties.Name="Dismiss"
148154
Content="&#xE894;"
149155
FontFamily="Segoe MDL2 Assets"
150156
FontSize="16"
157+
VerticalAlignment="{StaticResource SystemControlMSEdgeNotificationDismissButtonVerticalAlignment}"
151158
Style="{StaticResource DismissTextBlockButtonStyle}">
152159
<Button.RenderTransform>
153160
<TranslateTransform x:Name="DismissButtonTransform" X="18" />

0 commit comments

Comments
 (0)