FrameworkContentElement.GetBindingExpression Method (DependencyProperty)

 

Gets the BindingExpression for the specified property's binding.

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

public BindingExpression GetBindingExpression(
	DependencyProperty dp
)

Parameters

dp
Type: System.Windows.DependencyProperty

The target DependencyProperty from which to get the binding.

Return Value

Type: System.Windows.Data.BindingExpression

Returns a BindingExpression if the target is data bound; otherwise, null.

The following example retrieves a binding by querying a property.

Binding binding = introParagraph.GetBindingExpression(FrameworkContentElement.TagProperty).ParentBinding;

.NET Framework
Available since 3.0
Return to top
Show: