예제 #1
0
파일: BindingTest.cs 프로젝트: dfr0/moon
		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");
		}
예제 #2
0
파일: BindingTest.cs 프로젝트: dfr0/moon
		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");
		}
예제 #3
0
파일: BindingTest.cs 프로젝트: dfr0/moon
		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");
		}