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

                Assert.AreEqual("foo", layout.entry.Text);
                Assert.AreEqual("bar", layout.entry.Placeholder);
            }
Example #4
0
			public void XReferenceAsBindingSource (bool useCompiledXaml)
			{
				var layout = new XReference (useCompiledXaml);

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

                Assert.AreSame(layout.image, layout.imageView.Content);
            }
Example #8
0
			public void SupportsXReference (bool useCompiledXaml)
			{
				var layout = new XReference (useCompiledXaml);
				Assert.AreSame (layout.image, layout.imageView.Content);
			}