FrameworkElement.GetBindingExpression(DependencyProperty) FrameworkElement.GetBindingExpression(DependencyProperty) FrameworkElement.GetBindingExpression(DependencyProperty) FrameworkElement.GetBindingExpression(DependencyProperty) Method

定義

傳回 BindingExpression,代表指定屬性的繫結。Returns the BindingExpression that represents the binding on the specified property.

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 DependencyProperty DependencyProperty

要從中取得繫結的目標 DependencyPropertyThe target DependencyProperty to get the binding from.

傳回

如果目標屬性具有使用中的繫結程序,則為 BindingExpression;否則會傳回 nullA BindingExpression if the target property has an active binding; otherwise, returns null.

備註

檢查的傳回值null是一項技術, 您可以用來判斷屬性是否具有使用中的系結。Checking the return value for null is a technique you can use to determine whether a property has an active binding.

這個方法其實只是BindingOperations.GetBindingExpression方法周圍的便利包裝函式。This method is really just a convenience wrapper around the BindingOperations.GetBindingExpression method. GetBindingExpression將目前的實例和dp參數傳遞至。 BindingOperations.GetBindingExpressionGetBindingExpression passes the current instance and the dp parameter to BindingOperations.GetBindingExpression.

適用於

另請參閱