Exemplo n.º 1
0
		public void DPWithDefaultValueFE_UseTargetNull ()
		{
			var o = new DPWithDefaultValueFrameworkElement { DataContext = new Rectangle { } };
			BindingOperations.SetBinding (o, DPWithDefaultValueFrameworkElement.DefaultValueProperty, new Binding ("DataContext") { });
			Assert.AreEqual (null, o.GetValue (DPWithDefaultValueFrameworkElement.DefaultValueProperty), "#1");
		}
Exemplo n.º 2
0
		public void DPWithDefaultValueFE_Broken_UseTargetNull ()
		{
			var o = new DPWithDefaultValueFrameworkElement { };
			BindingOperations.SetBinding (o, DPWithDefaultValueFrameworkElement.DefaultValueProperty, new Binding { TargetNullValue = "Foo" });
			Assert.AreEqual ("Foo", o.GetValue (DPWithDefaultValueFrameworkElement.DefaultValueProperty), "#1");
		}
Exemplo n.º 3
0
		public void DPWithDefaultValueFE_Broken_DoNotUseFallback ()
		{
			var o = new DPWithDefaultValueFrameworkElement { };
			BindingOperations.SetBinding (o, DPWithDefaultValueFrameworkElement.DefaultValueProperty, new Binding { FallbackValue = "Foo" });
			Assert.AreEqual (DPWithDefaultValueFrameworkElement.Value, o.GetValue (DPWithDefaultValueFrameworkElement.DefaultValueProperty), "#1");
		}