语言

BindingOperations.GetBindingExpressionBase 方法

定义

BindingExpressionBase检索在指定属性上设置的对象。

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

参数

target
DependencyObject

其中 dp 的对象。

dp
DependencyProperty

要从中检索对象的 BindingExpressionBase 绑定目标属性。

返回

在 BindingExpressionBase 给定属性上设置的对象,或者 null 未设置任何绑定对象。

例外

参数targetdp不能为 null。

注解

该BindingExpressionBase类是和类的通用基类BindingExpressionPriorityBindingExpressionMultiBindingExpression。 如果事先知道在属性上设置的绑定类型,则可以使用GetBindingExpression和GetPriorityBindingExpressionGetMultiBindingExpression方法。

适用于

另请参阅