Ejemplo n.º 1
0
        public void When_PrivateProperty_And_Binding()
        {
            var source = new PrivateProperty(42);
            var SUT    = new Windows.UI.Xaml.Controls.Grid();

            SUT.SetBinding(
                Windows.UI.Xaml.Controls.Grid.TagProperty,
                new Binding()
            {
                Path = "MyProperty"
            }
                );

            SUT.DataContext = source;

            Assert.IsNull(SUT.Tag);
        }
Ejemplo n.º 2
0
        public void When_PrivateProperty_And_XBind()
        {
            var source = new PrivateProperty(42);
            var SUT    = new Windows.UI.Xaml.Controls.Grid();

            SUT.SetBinding(
                Windows.UI.Xaml.Controls.Grid.TagProperty,
                new Binding()
            {
                Path           = "MyProperty",
                CompiledSource = source
            }
                );

            SUT.ApplyCompiledBindings();

            Assert.AreEqual(42, SUT.Tag);
        }