Επεξεργασία

Κοινή χρήση μέσω


FrameworkPropertyMetadata.Merge(PropertyMetadata, DependencyProperty) Method

Definition

Enables a merge of the source metadata with base metadata.

protected:
 override void Merge(System::Windows::PropertyMetadata ^ baseMetadata, System::Windows::DependencyProperty ^ dp);
protected override void Merge (System.Windows.PropertyMetadata baseMetadata, System.Windows.DependencyProperty dp);
override this.Merge : System.Windows.PropertyMetadata * System.Windows.DependencyProperty -> unit
Protected Overrides Sub Merge (baseMetadata As PropertyMetadata, dp As DependencyProperty)

Parameters

baseMetadata
PropertyMetadata

The base metadata to merge.

dp
DependencyProperty

The dependency property this metadata is being applied to.

Remarks

This method is used internally when metadata is being overridden.

Notes to Inheritors

Classes that derive from PropertyMetadata (or this class particularly) should override this method to account for any metadata properties they have added in their implementations. For instance, your implementation might have added a new flagwise enumeration value, and the Merge(PropertyMetadata, DependencyProperty) implementation should then be able to combine those flags correctly.

Always call the base implementation prior to your own implementation, because the base implementation takes care of merging all the properties already defined on previous types in the hierarchy.

The behavior added by the Merge(PropertyMetadata, DependencyProperty) implementation in FrameworkPropertyMetadata is that specific WPF framework-level properties in the metadata such as AffectsRender are combined in a bitwise or operation.

The Merge(PropertyMetadata, DependencyProperty) behavior also implements the behavior when you override the property metadata on an existing dependency property by calling OverrideMetadata(Type, PropertyMetadata), using override metadata that is FrameworkPropertyMetadata.

Applies to

See also