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

傳回

若目標為資料綁定,則回傳 aBindingExpression;否則,。 null

範例

以下範例透過查詢屬性來取得綁定。

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

適用於