This documentation is archived and is not being maintained.

FrameworkPropertyMetadata.Merge Method

Enables a merge of the source metadata with base metadata.

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)

protected override void Merge (
	PropertyMetadata baseMetadata,
	DependencyProperty dp
protected void Merge (
	PropertyMetadata baseMetadata, 
	DependencyProperty dp
protected override function Merge (
	baseMetadata : PropertyMetadata, 
	dp : DependencyProperty
You cannot use methods in XAML.



The base metadata to merge.


The dependency property this metadata is being applied to.

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 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 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 behavior also implements the behavior when you override the property metadata on an existing dependency property by calling OverrideMetadata., using override metadata that is FrameworkPropertyMetadata.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0