DependencyObject.SetCurrentValue(DependencyProperty, Object) Yöntem
Tanım
Bir bağımlılık özelliğinin değerini, değer kaynağını değiştirmeden ayarlar.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)
Parametreler
Ayarlanacak bağımlılık özelliğinin tanımlayıcısı.The identifier of the dependency property to set.
- value
- Object
Yeni yerel değer.The new local value.
Özel durumlar
Salt okunurdur bir bağımlılık özelliğini değiştirme girişiminde bulunuldu veya korumalı bir özellik DependencyObject .Attempted to modify a read-only dependency property, or a property on a sealed DependencyObject.
value
özelliği için kayıtlı olan doğru türde değildi dp
.value
was not the correct type as registered for the dp
property.
Açıklamalar
Bu yöntem, uygulamanın tanımlanmış kullanımını devre dışı bırakmadan kendi özelliklerinden birinin değerini programlı olarak ayarlayan bir bileşen tarafından kullanılır.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. SetCurrentValueYöntemi, özelliğin etkin değerini değiştirir, ancak var olan Tetikleyiciler, veri bağlamaları ve stiller çalışmaya devam edecektir.The SetCurrentValue method changes the effective value of the property, but existing triggers, data bindings, and styles will continue to work.