Exemplo n.º 1
0
            public void CrossXReference(bool useCompiledXaml)
            {
                var layout = new XReference(useCompiledXaml);

                Assert.AreSame(layout.label0, layout.label1.BindingContext);
                Assert.AreSame(layout.label1, layout.label0.BindingContext);
            }
Exemplo n.º 2
0
            public void XReferenceAsBindingSource(bool useCompiledXaml)
            {
                var layout = new XReference(useCompiledXaml);

                Assert.AreEqual("foo", layout.entry.Text);
                Assert.AreEqual("bar", layout.entry.Placeholder);
            }
Exemplo n.º 3
0
            public void XReferenceAsCommandParameterToSelf(bool useCompiledXaml)
            {
                var layout = new XReference(useCompiledXaml);

                var button = layout.aButton;

                button.BindingContext = new {
                    ButtonClickCommand = new Command(o => {
                        if (o == button)
                        {
                            Assert.Pass();
                        }
                    })
                };
                ((IButtonController)button).SendClicked();
                Assert.Fail();
            }
Exemplo n.º 4
0
            public void SupportsXReference(bool useCompiledXaml)
            {
                var layout = new XReference(useCompiledXaml);

                Assert.AreSame(layout.image, layout.imageView.Content);
            }