This topic has not yet been rated - Rate this topic

FrameworkPropertyMetadata::OverridesInheritanceBehavior Property

Gets or sets a value that indicates whether the property value inheritance evaluation should span across certain content boundaries in the logical tree of elements.

Namespace:  System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
public:
property bool OverridesInheritanceBehavior {
	bool get ();
	void set (bool value);
}
Members of this class are not typically used in XAML.

Property Value

Type: System::Boolean
true if the property value inheritance should span across certain content boundaries; otherwise, false. The default is false.
ExceptionCondition
InvalidOperationException

The metadata has already been applied to a dependency property operation, so that metadata is sealed and properties of the metadata cannot be set.

This metadata reports a seldom-applied modification to property value inheritance behavior across special parent element-child element boundaries. The canonical example of such a boundary is the contents of a Frame, where the Frame content might get reloaded independently of the existence of the Frame. The desired property system behavior is that property value inheritance should not traverse into the contents of the Frame, because these contents might be elements that the application hosting the frame does not own or control. Specifying metadata with OverridesInheritanceBehavior set to true, as well as specifying Inherits as true, will cause the property on which the metadata is applied to be inheritable even across the Frame boundary or similar boundaries.

Properties on derived classes of PropertyMetadata are typically defined in the object model as read-write. This is so they can be adjusted after initialization of the instance. However, after the metadata is consumed as part of a call to Register, AddOwner, or OverrideMetadata, the property system will seal that metadata instance and properties that convey the specifics of the metadata are now considered immutable. Attempting to set this property after IsSealed is true on this metadata instance will raise an exception.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.