FrameworkContentElement.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

如果目标为数据绑定,则返回 BindingExpression;否则返回 null

示例

以下示例通过查询属性检索绑定。

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

适用于