-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(xamlreader): Process members on top-level resource dicitonaries
- Loading branch information
1 parent
bb45d4d
commit 732d001
Showing
4 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...ows_UI_Xaml_Markup/XamlReaderTests/When_ResourceDictionary_With_Theme_And_Static.xamltest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<!--Colors--> | ||
<!--Themed colors--> | ||
<ResourceDictionary.ThemeDictionaries> | ||
<ResourceDictionary x:Key="Light"> | ||
<Color x:Key="OnPrimaryColor">#FFFFFF</Color> | ||
</ResourceDictionary> | ||
<ResourceDictionary x:Key="Dark"> | ||
<Color x:Key="PrimaryColor">#544794</Color> | ||
</ResourceDictionary> | ||
</ResourceDictionary.ThemeDictionaries> | ||
<!--Unthemed colors--> | ||
<Color x:Key="MyCustomFirstColor">#B910A8</Color> | ||
<!--Custom colors brushes--> | ||
<SolidColorBrush x:Key="CustomSecondBrush" Color="{ThemeResource CustomSecondColor}" /> | ||
<SolidColorBrush x:Key="MyCustomFirstBrush" Color="{ThemeResource MyCustomFirstColor}" /> | ||
</ResourceDictionary> |
28 changes: 28 additions & 0 deletions
28
...ts/Windows_UI_Xaml_Markup/XamlReaderTests/When_ThemeResource_With_StaticResource.xamltest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" | ||
Name="rootPage" | ||
mc:Ignorable="d"> | ||
|
||
<Page.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.ThemeDictionaries> | ||
<ResourceDictionary x:Key="Light"> | ||
<Color x:Key="Color1">#FFFFFF</Color> | ||
</ResourceDictionary> | ||
<ResourceDictionary x:Key="Dark"> | ||
<Color x:Key="Color1">#000000</Color> | ||
</ResourceDictionary> | ||
</ResourceDictionary.ThemeDictionaries> | ||
|
||
<Color x:Key="Color2">#B910A8</Color> | ||
</ResourceDictionary> | ||
</Page.Resources> | ||
|
||
<StackPanel> | ||
<Border Background="{StaticResource Color1}" /> | ||
<Border Background="{StaticResource Color2}" /> | ||
</StackPanel> | ||
</Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters