summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml.UnitTests/Issues/Issue1564.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests/Issues/Issue1564.cs')
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Issues/Issue1564.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Issue1564.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Issue1564.cs
new file mode 100644
index 00000000..895eb900
--- /dev/null
+++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Issue1564.cs
@@ -0,0 +1,29 @@
+using System;
+using NUnit.Framework;
+
+namespace Xamarin.Forms.Xaml.UnitTests
+{
+ [TestFixture]
+ public class Issue1564
+ {
+ [Test]
+ public void ViewCellAsXamlRoot ()
+ {
+ var xaml = @"<?xml version=""1.0"" encoding=""UTF-8""?>
+ <ViewCell
+ xmlns=""http://xamarin.com/schemas/2014/forms""
+ xmlns:x=""http://schemas.microsoft.com/winfx/2009/xaml""
+ x:Class=""m.transport.VehicleCell"">
+ <ViewCell.View>
+ <StackLayout>
+ <Label Text=""This is my label""></Label>
+ </StackLayout>
+ </ViewCell.View>
+ </ViewCell>";
+ var cell = new ViewCell ().LoadFromXaml (xaml);
+ Assert.NotNull (cell);
+ Assert.AreEqual ("This is my label", ((cell.View as StackLayout).Children [0] as Label).Text);
+ }
+ }
+}
+