Пример #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);
            }