DependencyObject.SetValueBase(DependencyProperty, Object) 方法

定義

DependencyProperty 的值設定為指定的 Object,略過 SetValue(DependencyProperty, Object)Sets the value of the DependencyProperty to the specified Object, bypassing the SetValue(DependencyProperty, Object).

public:
 void SetValueBase(System::Workflow::ComponentModel::DependencyProperty ^ dependencyProperty, System::Object ^ value);
public void SetValueBase (System.Workflow.ComponentModel.DependencyProperty dependencyProperty, object value);
member this.SetValueBase : System.Workflow.ComponentModel.DependencyProperty * obj -> unit

參數

dependencyProperty
DependencyProperty

DependencyProperty,要設定為 ObjectThe DependencyProperty to be set to the Object.

value
Object

Object,會變成 DependencyProperty 的值。The Object that becomes the value of the DependencyProperty.

例外狀況

dependencyProperty 為 null 參考 (在 Visual Basic 中為 Nothing)。dependencyProperty is a null reference (Nothing in Visual Basic).

備註

這個方法在 SetValue 覆寫實作內部很有用。This method is useful inside the SetValue override implementation. 一般而言,SetValue 覆寫程式碼會先進行一些自訂邏輯,再呼叫 SetValueBase 方法。Typically, the SetValue override code would do some custom logic before calling the SetValueBase method.

對於設定 SetValue 覆寫,PropertyMetadata 可用於 DependencyPropertyRegisterRegisterAttached 呼叫。For setting a SetValue override, PropertyMetadata can be used in DependencyProperty, Register, or RegisterAttached calls.

適用於