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); }
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); }