语言

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。

适用于

另请参阅