Skip to content

Commit

Permalink
Theme resource fixes (microsoft#1638)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiguo authored Nov 21, 2019
1 parent 9d0819d commit 922b818
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
12 changes: 8 additions & 4 deletions dev/CommonStyles/FlyoutPresenter_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<StaticResource x:Key="FlyoutPresenterBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
<StaticResource x:Key="FlyoutBorderThemeBrush" ResourceKey="SystemControlTransientBorderBrush" />
<contract7Present:StaticResource x:Key="FlyoutPresenterBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
<contract7NotPresent:StaticResource x:Key="FlyoutPresenterBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
<contract7Present:StaticResource x:Key="FlyoutBorderThemeBrush" ResourceKey="SystemControlTransientBorderBrush" />
<contract7NotPresent:StaticResource x:Key="FlyoutBorderThemeBrush" ResourceKey="SystemControlForegroundChromeHighBrush" />
<Thickness x:Key="FlyoutBorderThemeThickness">1</Thickness>
<Thickness x:Key="FlyoutBorderThemePadding">0</Thickness>
</ResourceDictionary>
Expand All @@ -19,8 +21,10 @@
<Thickness x:Key="FlyoutBorderThemePadding">0</Thickness>
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<StaticResource x:Key="FlyoutPresenterBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
<StaticResource x:Key="FlyoutBorderThemeBrush" ResourceKey="SystemControlTransientBorderBrush" />
<contract7Present:StaticResource x:Key="FlyoutPresenterBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
<contract7NotPresent:StaticResource x:Key="FlyoutPresenterBackground" ResourceKey="SystemControlBackgroundChromeMediumLowBrush" />
<contract7Present:StaticResource x:Key="FlyoutBorderThemeBrush" ResourceKey="SystemControlTransientBorderBrush" />
<contract7NotPresent:StaticResource x:Key="FlyoutBorderThemeBrush" ResourceKey="SystemControlForegroundChromeHighBrush" />
<Thickness x:Key="FlyoutBorderThemeThickness">1</Thickness>
<Thickness x:Key="FlyoutBorderThemePadding">0</Thickness>
</ResourceDictionary>
Expand Down
9 changes: 8 additions & 1 deletion dev/ContentDialog/ContentDialog_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:contract5Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:contract5NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
xmlns:contract7NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,7)">
<ResourceDictionary.ThemeDictionaries>
Expand Down Expand Up @@ -264,7 +266,12 @@
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid x:Name="LayoutRoot" Visibility="Collapsed" Background="{ThemeResource SystemControlPageBackgroundMediumAltMediumBrush}">
<Grid x:Name="LayoutRoot"
contract5Present:Visibility="Collapsed"
Background="{ThemeResource SystemControlPageBackgroundMediumAltMediumBrush}">
<contract5NotPresent:Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
</contract5NotPresent:Grid.ColumnDefinitions>
<Border
x:Name="BackgroundElement"
Background="{TemplateBinding Background}"
Expand Down

0 comments on commit 922b818

Please sign in to comment.