DependencyObject.SetCurrentValue(DependencyProperty, Object) メソッド
定義
依存関係プロパティ値のソースを変更せずにその値を設定します。Sets the value of a dependency property without changing its value source.
public:
void SetCurrentValue(System::Windows::DependencyProperty ^ dp, System::Object ^ value);
public void SetCurrentValue (System.Windows.DependencyProperty dp, object value);
member this.SetCurrentValue : System.Windows.DependencyProperty * obj -> unit
Public Sub SetCurrentValue (dp As DependencyProperty, value As Object)
パラメーター
設定する依存関係プロパティの識別子。The identifier of the dependency property to set.
- value
- Object
新しいローカル値。The new local value.
例外
読み取り専用の依存関係プロパティ、またはシールされている DependencyObject 上のプロパティを変更しようとしました。Attempted to modify a read-only dependency property, or a property on a sealed DependencyObject.
value
が、dp
プロパティに登録されている正しい型ではありません。value
was not the correct type as registered for the dp
property.
注釈
このメソッドは、アプリケーションで宣言されたプロパティの使用を無効にせずに、独自のプロパティのいずれかの値をプログラムで設定するコンポーネントによって使用されます。This method is used by a component that programmatically sets the value of one of its own properties without disabling an application's declared use of the property. SetCurrentValueメソッドはプロパティの有効値を変更しますが、既存のトリガー、データバインディング、およびスタイルは引き続き機能します。The SetCurrentValue method changes the effective value of the property, but existing triggers, data bindings, and styles will continue to work.