DependencyObject.SetBinding(DependencyProperty, ActivityBind) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置指定 ActivityBind的 DependencyProperty。
public:
void SetBinding(System::Workflow::ComponentModel::DependencyProperty ^ dependencyProperty, System::Workflow::ComponentModel::ActivityBind ^ bind);
public void SetBinding(System.Workflow.ComponentModel.DependencyProperty dependencyProperty, System.Workflow.ComponentModel.ActivityBind bind);
member this.SetBinding : System.Workflow.ComponentModel.DependencyProperty * System.Workflow.ComponentModel.ActivityBind -> unit
Public Sub SetBinding (dependencyProperty As DependencyProperty, bind As ActivityBind)
参数
- dependencyProperty
- DependencyProperty
- bind
- ActivityBind
要 ActivityBind 设置为的。
例外
其中任一参数都是 null 引用(Visual Basic 中的 Nothing)。
PropertyMetadata与DependencyProperty它关联的是只读的,是元数据,或者不可绑定。
注解
SetValue 将值直接设置为 DependencyProperty. 同样, AddHandler 将处理程序直接添加到类型事件的属性。
当为同一属性调用这些方法时,这些方法是独占的。 如果 SetBinding 调用,则忽略以前使用 SetValue (AddHandler 事件中)设置的值。 同样,另一种方法是: SetValue (AddHandler) 重置分配的 SetBinding绑定。