FrameworkPropertyMetadata.OnApply(DependencyProperty, Type) Method

Definition

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

C#
protected override void OnApply(System.Windows.DependencyProperty dp, Type targetType);

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 can be null.

Remarks

Any mutability of the data structure of a FrameworkPropertyMetadata instance should be marked as immutable when this method is invoked.

Notes to Inheritors

The FrameworkPropertyMetadata implementation of this method does nothing beyond calling the base implementation.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also