示例#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);
            }
示例#2
0
            public void XReferenceAsBindingSource(bool useCompiledXaml)
            {
                var layout = new XReference(useCompiledXaml);

                Assert.AreEqual("foo", layout.entry.Text);
                Assert.AreEqual("bar", layout.entry.Placeholder);
            }
示例#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();
            }
示例#4
0
            public void SupportsXReference(bool useCompiledXaml)
            {
                var layout = new XReference(useCompiledXaml);

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