public void DataTemplateInResourceDictionaries (bool useCompiledXaml) { var layout = new Bz27863 (useCompiledXaml); var listview = layout.Resources ["listview"] as ListView; Assert.NotNull (listview.ItemTemplate); var template = listview.ItemTemplate; var cell = template.CreateContent () as ViewCell; cell.BindingContext = "Foo"; Assert.AreEqual ("ooF", ((Label)((StackLayout)cell.View).Children [0]).Text); }
public void DataTemplateInResourceDictionaries(bool useCompiledXaml) { var layout = new Bz27863(useCompiledXaml); var listview = layout.Resources["listview"] as ListView; Assert.NotNull(listview.ItemTemplate); var template = listview.ItemTemplate; var cell = template.CreateContent() as ViewCell; cell.BindingContext = "Foo"; Assert.AreEqual("ooF", ((Label)((StackLayout)cell.View).Children[0]).Text); }