共用方式為


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

適用於