FrameworkElement.GetBindingExpression Method (DependencyProperty)
Returns the BindingExpression that represents the binding on the specified property.
Assembly: PresentationFramework (in PresentationFramework.dll)
Parameters
- dp
-
Type:
System.Windows.DependencyProperty
The target DependencyProperty to get the binding from.
Return Value
Type: System.Windows.Data.BindingExpressionA BindingExpression if the target property has an active binding; otherwise, returns null.
Checking the return value for null is a technique you can use to determine whether a property has an active binding.
This method is really just a convenience wrapper around the BindingOperations.GetBindingExpression method. GetBindingExpression passes the current instance and the dp parameter to BindingOperations.GetBindingExpression.
.NET Framework
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0