แก้ไข

แชร์ผ่าน


PropertyMetadata.OnApply(DependencyProperty, Type) Method

Definition

Called when this metadata has been applied to a property, which indicates that the metadata is being sealed.

protected:
 virtual void OnApply(System::Windows::DependencyProperty ^ dp, Type ^ targetType);
protected virtual void OnApply (System.Windows.DependencyProperty dp, Type targetType);
abstract member OnApply : System.Windows.DependencyProperty * Type -> unit
override this.OnApply : System.Windows.DependencyProperty * Type -> unit
Protected Overridable Sub OnApply (dp As DependencyProperty, targetType As Type)

Parameters

dp
DependencyProperty

The dependency property to which the metadata has been applied.

targetType
Type

The type associated with this metadata if this is type-specific metadata. If this is default metadata, this value is a null reference.

Remarks

Subclasses should assure that any mutability of the data structure of a PropertyMetadata subclass should be marked as immutable once OnApply is called. This will be called once the metadata is applied to a property system operation (register, add owner, override metadata).

Applies to