Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
 FrameworkPropertyMetadataOptions En...
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
FrameworkPropertyMetadataOptions Enumeration

Updated: November 2007

Specifies the types of framework-level property behavior that pertain to a particular dependency property in the Windows Presentation Foundation (WPF) property system.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

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

Visual Basic (Declaration)
<FlagsAttribute> _
Public Enumeration FrameworkPropertyMetadataOptions
Visual Basic (Usage)
Dim instance As FrameworkPropertyMetadataOptions
C#
[FlagsAttribute]
public enum FrameworkPropertyMetadataOptions
Visual C++
[FlagsAttribute]
public enum class FrameworkPropertyMetadataOptions
J#
/** @attribute FlagsAttribute */
public enum FrameworkPropertyMetadataOptions
JScript
public enum FrameworkPropertyMetadataOptions
XAML Attribute Usage
<object property="enumerationValue" .../>
Member nameDescription
None No options are specified; the dependency property uses the default behavior of the Windows Presentation Foundation (WPF) property system.
AffectsMeasure The measure pass of layout compositions is affected by value changes to this dependency property.
AffectsArrange The arrange pass of layout composition is affected by value changes to this dependency property.
AffectsParentMeasure The measure pass on the parent element is affected by value changes to this dependency property.
AffectsParentArrange The arrange pass on the parent element is affected by value changes to this dependency property.
AffectsRender Some aspect of rendering or layout composition (other than measure or arrange) is affected by value changes to this dependency property.
Inherits The values of this dependency property are inherited by child elements.
OverridesInheritanceBehavior The values of this dependency property span separated trees for purposes of property value inheritance.
NotDataBindable Data binding to this dependency property is not allowed.
BindsTwoWayByDefault The BindingMode for data bindings on this dependency property defaults to TwoWay.
Journal The values of this dependency property should be saved or restored by journaling processes, or when navigating by Uniform resource identifiers (URIs).
SubPropertiesDoNotAffectRender The subproperties on the value of this dependency property do not affect any aspect of rendering.

Use this enumeration when you construct a FrameworkPropertyMetadata instance where you want to specify one or more the framework-level metadata option settings.

You no longer use this enumeration after the constructor call. Instead, query the particular metadata option that was set during registration by checking the true or false value of a specific property of an existing FrameworkPropertyMetadata. These property names match the FrameworkPropertyMetadataOptions enumeration values except for NotDataBindable, which is IsNotDataBindable on the finished FrameworkPropertyMetadata.

The Journal option only specifies the intention to be journaled. The actual journaling may or may not be addressed by journaling services such as those that are present in the WPF viewer application. In particular, journaling has some known limitations if the element tree was constructed through code rather than XAML. For details, see Navigation Overview.

Note:

Although property value inheritance might appear to work for nonattached dependency properties, the inheritance behavior for a nonattached property through certain element boundaries in the runtime tree is undefined. Always use RegisterAttached to register properties where you specify Inherits in the metadata.

The following example calls the FrameworkPropertyMetadata constructor, and sets several options by using values from the FrameworkPropertyMetadataOptions enumeration.

C#
fpm = new FrameworkPropertyMetadata(
    Double.NaN,
    (FrameworkPropertyMetadataOptions.AffectsRender |
      FrameworkPropertyMetadataOptions.BindsTwoWayByDefault),
    new PropertyChangedCallback(OnCurrentReadingChanged),
    new CoerceValueCallback(CoerceCurrentReading)
);

Windows Vista

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker