Export (0) Print
Expand All

BindingOperations.ClearBinding Method

Removes the binding from a property if there is one.

Namespace:  System.Windows.Data
Assembly:  PresentationFramework (in PresentationFramework.dll)

public static void ClearBinding(
	DependencyObject target,
	DependencyProperty dp
)

Parameters

target
Type: System.Windows.DependencyObject

The object from which to remove the binding.

dp
Type: System.Windows.DependencyProperty

The dependency property from which to remove the binding.

ExceptionCondition
ArgumentNullException

The target and dp parameters cannot be null.

If the given property is data-bound with a Binding, PriorityBinding, or MultiBinding, this method removes the corresponding binding expression and restores the value of the property to what it was before any local value was set through the binding.

If the given property is not data-bound, this method has no effect.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft