Skip to content

Commit 9658240

Browse files
committed
fix xaml style
1 parent f74f213 commit 9658240

File tree

2 files changed

+31
-19
lines changed

2 files changed

+31
-19
lines changed

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<ResourceDictionary
2-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:local="using:Microsoft.Toolkit.Uwp.UI.Controls"
5-
xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
6-
xmlns:contract7NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,7)">
1+
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3+
xmlns:contract7NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,7)"
4+
xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
5+
xmlns:local="using:Microsoft.Toolkit.Uwp.UI.Controls">
76

87
<ResourceDictionary.MergedDictionaries>
98
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/MSEdgeNotificationStyle.xaml" />
109
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/VSCodeNotificationStyle.xaml" />
1110
</ResourceDictionary.MergedDictionaries>
1211

13-
<Style TargetType="local:InAppNotification" x:Key="BaseInAppNotificationsStyle">
12+
<Style x:Key="BaseInAppNotificationsStyle"
13+
TargetType="local:InAppNotification">
1414
<Setter Property="Background" Value="{ThemeResource SystemControlBackgroundChromeMediumBrush}" />
1515
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
1616
<Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundBaseLowBrush}" />
@@ -31,11 +31,13 @@
3131
<Setter Property="Template" Value="{StaticResource MSEdgeNotificationTemplate}" />
3232
</Style>
3333

34-
<contract7NotPresent:Style TargetType="local:InAppNotification" BasedOn="{StaticResource BaseInAppNotificationsStyle}">
34+
<contract7NotPresent:Style BasedOn="{StaticResource BaseInAppNotificationsStyle}"
35+
TargetType="local:InAppNotification">
3536
<Setter Property="Background" Value="{ThemeResource SystemControlBackgroundChromeMediumLowBrush}" />
3637
</contract7NotPresent:Style>
3738

38-
<contract7Present:Style TargetType="local:InAppNotification" BasedOn="{StaticResource BaseInAppNotificationsStyle}">
39+
<contract7Present:Style BasedOn="{StaticResource BaseInAppNotificationsStyle}"
40+
TargetType="local:InAppNotification">
3941
<Setter Property="Background" Value="{ThemeResource SystemControlChromeMediumLowAcrylicElementMediumBrush}" />
4042
</contract7Present:Style>
4143
</ResourceDictionary>

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

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,26 @@
88
out below
99
-->
1010
<ResourceDictionary x:Key="Default">
11-
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationPointerOverChromeBrush" Color="Transparent" />
12-
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationPointerOverForegroundBrush" Color="{ThemeResource SystemBaseMediumColor}" />
13-
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationPointerPressedForegroundBrush" Color="{ThemeResource SystemBaseHighColor}" />
14-
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationButtonBorderBrush" Color="Transparent" />
11+
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationPointerOverChromeBrush"
12+
Color="Transparent" />
13+
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationPointerOverForegroundBrush"
14+
Color="{ThemeResource SystemBaseMediumColor}" />
15+
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationPointerPressedForegroundBrush"
16+
Color="{ThemeResource SystemBaseHighColor}" />
17+
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationButtonBorderBrush"
18+
Color="Transparent" />
1519
</ResourceDictionary>
1620

1721
<!-- HighContrast is used in all high contrast themes -->
1822
<ResourceDictionary x:Key="HighContrast">
19-
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationPointerOverChromeBrush" Color="{ThemeResource SystemColorHighlightColor}" />
20-
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationPointerOverForegroundBrush" Color="{ThemeResource SystemBaseHighColor}"/>
21-
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationPointerPressedForegroundBrush" Color="{ThemeResource SystemBaseHighColor}" />
22-
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationButtonBorderBrush" Color="{ThemeResource SystemColorButtonTextColor}" />
23+
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationPointerOverChromeBrush"
24+
Color="{ThemeResource SystemColorHighlightColor}" />
25+
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationPointerOverForegroundBrush"
26+
Color="{ThemeResource SystemBaseHighColor}" />
27+
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationPointerPressedForegroundBrush"
28+
Color="{ThemeResource SystemBaseHighColor}" />
29+
<SolidColorBrush x:Key="SystemControlMSEdgeNotificationButtonBorderBrush"
30+
Color="{ThemeResource SystemColorButtonTextColor}" />
2331
</ResourceDictionary>
2432
</ResourceDictionary.ThemeDictionaries>
2533

@@ -64,8 +72,10 @@
6472
</VisualState>
6573
<VisualState x:Name="Pressed">
6674
<Storyboard>
67-
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
68-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlMSEdgeNotificationPointerPressedForegroundBrush}" />
75+
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text"
76+
Storyboard.TargetProperty="Foreground">
77+
<DiscreteObjectKeyFrame KeyTime="0"
78+
Value="{ThemeResource SystemControlMSEdgeNotificationPointerPressedForegroundBrush}" />
6979
</ObjectAnimationUsingKeyFrames>
7080
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid"
7181
Storyboard.TargetProperty="Background">

0 commit comments

Comments
 (0)