Exemplo n.º 1
0
            //this was later reported as https://github.com/xamarin/System.Maui/issues/7286
            public void RegisteringXNameOnSubPages([Values(false, true)] bool useCompiledXaml)
            {
                var layout = new Gh7097(useCompiledXaml);
                var s      = layout.FindByName("self");

                Assert.That(layout.self, Is.Not.Null);
                Assert.That(layout.collectionview, Is.Not.Null);
            }
Exemplo n.º 2
0
            public void CanXReferenceRoot([Values(false, true)] bool useCompiledXaml)
            {
                var layout = new Gh7097(useCompiledXaml)
                {
                    BindingContext = new {
                        Button1Command = new MockCommand(),
                        Button2Command = new MockCommand(),
                    }
                };
                var cv      = layout.Content as CollectionView;
                var content = cv.ItemTemplate.CreateContent() as StackLayout;
                var btn1    = content.Children[0] as Button;

                Assert.That(btn1.Command, Is.TypeOf <MockCommand>());
            }