共用方式為


BindingOperations.GetBinding(DependencyObject, DependencyProperty) 方法

定義

擷取針對指定之屬性設定的 Binding 物件。

public:
 static System::Windows::Data::Binding ^ GetBinding(System::Windows::DependencyObject ^ target, System::Windows::DependencyProperty ^ dp);
public static System.Windows.Data.Binding GetBinding (System.Windows.DependencyObject target, System.Windows.DependencyProperty dp);
static member GetBinding : System.Windows.DependencyObject * System.Windows.DependencyProperty -> System.Windows.Data.Binding
Public Shared Function GetBinding (target As DependencyObject, dp As DependencyProperty) As Binding

參數

target
DependencyObject

dp 所在的物件。

dp
DependencyProperty

要從其中擷取繫結的繫結目標屬性。

傳回

Binding

針對指定之屬性設定的 Binding 物件;如果未設定 Binding 物件,則為 null

例外狀況

targetdp 參數都不能為 null。

適用於

另請參閱