diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2016-04-18 18:31:48 +0200 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-04-18 17:31:48 +0100 |
commit | 9c005f30227eaf0d3aa7d253a7c3a9ea427c91c2 (patch) | |
tree | 6e261e80af1bfa70feeecb07ac0762c8fdee2382 /Xamarin.Forms.Xaml.UnitTests | |
parent | 4d279db34812891975aa0e8d73e3d5dd970a692c (diff) | |
download | xamarin-forms-9c005f30227eaf0d3aa7d253a7c3a9ea427c91c2.tar.gz xamarin-forms-9c005f30227eaf0d3aa7d253a7c3a9ea427c91c2.tar.bz2 xamarin-forms-9c005f30227eaf0d3aa7d253a7c3a9ea427c91c2.zip |
[C] Allow implicit styles and DynamicResources in shared RD (#104)
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests')
-rw-r--r-- | Xamarin.Forms.Xaml.UnitTests/TestSharedResourceDictionary.xaml | 10 | ||||
-rw-r--r-- | Xamarin.Forms.Xaml.UnitTests/TestSharedResourceDictionary.xaml.cs | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/TestSharedResourceDictionary.xaml b/Xamarin.Forms.Xaml.UnitTests/TestSharedResourceDictionary.xaml index c87982f8..62c1abd2 100644 --- a/Xamarin.Forms.Xaml.UnitTests/TestSharedResourceDictionary.xaml +++ b/Xamarin.Forms.Xaml.UnitTests/TestSharedResourceDictionary.xaml @@ -4,12 +4,13 @@ xmlns:local="clr-namespace:Xamarin.Forms.Xaml.UnitTests" x:Class="Xamarin.Forms.Xaml.UnitTests.TestSharedResourceDictionary"> <StackLayout> - <ContentView> - <ContentView.Resources> + <StackLayout> + <StackLayout.Resources> <ResourceDictionary MergedWith="local:SharedResourceDictionary"/> - </ContentView.Resources> + </StackLayout.Resources> <Label x:Name="label" Style="{StaticResource sharedfoo}"/> - </ContentView> + <Label x:Name="implicitLabel" /> + </StackLayout> <ContentView> <ContentView.Resources> <ResourceDictionary MergedWith="local:SharedResourceDictionary2"/> @@ -17,5 +18,4 @@ <Label x:Name="label2" Style="{StaticResource sharedStyle2}"/> </ContentView> </StackLayout> - </ContentPage>
\ No newline at end of file diff --git a/Xamarin.Forms.Xaml.UnitTests/TestSharedResourceDictionary.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/TestSharedResourceDictionary.xaml.cs index e12e83b7..a272decc 100644 --- a/Xamarin.Forms.Xaml.UnitTests/TestSharedResourceDictionary.xaml.cs +++ b/Xamarin.Forms.Xaml.UnitTests/TestSharedResourceDictionary.xaml.cs @@ -35,6 +35,14 @@ namespace Xamarin.Forms.Xaml.UnitTests Assert.AreEqual (Color.Pink, layout.label.TextColor); Assert.AreEqual (Color.Purple, layout.label2.TextColor); } + + [TestCase (false)] + [TestCase (true)] + public void ImplicitStyleCanBeSharedFromSharedRD (bool useCompiledXaml) + { + var layout = new TestSharedResourceDictionary(useCompiledXaml); + Assert.AreEqual(Color.Red, layout.implicitLabel.TextColor); + } } } }
\ No newline at end of file |