FrameworkElement.GetBindingExpression(DependencyProperty) メソッド

定義

指定したプロパティのバインドを表す BindingExpression を返します。

public:
 System::Windows::Data::BindingExpression ^ GetBindingExpression(System::Windows::DependencyProperty ^ dp);
public System.Windows.Data.BindingExpression GetBindingExpression(System.Windows.DependencyProperty dp);
member this.GetBindingExpression : System.Windows.DependencyProperty -> System.Windows.Data.BindingExpression
Public Function GetBindingExpression (dp As DependencyProperty) As BindingExpression

パラメーター

dp
DependencyProperty

バインディングを取得するターゲット DependencyProperty

返品

ターゲット プロパティにアクティブなバインディングがある場合は BindingExpression 。それ以外の場合は、 nullを返します。

注釈

nullの戻り値を確認することは、プロパティにアクティブなバインドがあるかどうかを判断するために使用できる手法です。

このメソッドは、 BindingOperations.GetBindingExpression メソッドの便利なラッパーにすぎません。 GetBindingExpression は、現在のインスタンスと dp パラメーターを BindingOperations.GetBindingExpressionに渡します。

適用対象

こちらもご覧ください