Mono.Xaml.XamlReflectionPropertySetter.SetBinding C# (CSharp) Method

SetBinding() private method

private SetBinding ( Binding binding ) : void
binding System.Windows.Data.Binding
return void
		private void SetBinding (Binding binding)
		{
			DependencyProperty prop = LookupDependencyProperty ();

			if (prop == null)
				throw Parser.ParseException ("Invalid Binding, can not find DependencyProperty {0}.", Name);

			DependencyObject dob = target as DependencyObject;

			if (dob == null)
				throw Parser.ParseException ("Bindings can not be used on non DependencyObject types.");

			BindingOperations.SetBinding (dob, prop, binding);
		}