Show / Hide Table of Contents

Class FrameworkPropertyMetadata

Reports or applies metadata for a dependency property, specifically adding framework-specific property system characteristics.

Inheritance
System.Object
PropertyMetadata
FrameworkPropertyMetadata
Inherited Members
PropertyMetadata.DefaultValue
PropertyMetadata.PropertyChangedCallback
PropertyMetadata.CoerceValueCallback
PropertyMetadata.IsSealed
PropertyMetadata.Inherits
PropertyMetadata.MethodToUpdateDom
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public class FrameworkPropertyMetadata : PropertyMetadata

Constructors

| Improve this Doc View Source

FrameworkPropertyMetadata()

Initializes a new instance of the FrameworkPropertyMetadata class.

Declaration
public FrameworkPropertyMetadata()
| Improve this Doc View Source

FrameworkPropertyMetadata(Object)

Initializes a new instance of the FrameworkPropertyMetadata class with the specified default value.

Declaration
public FrameworkPropertyMetadata(object defaultValue)
Parameters
Type Name Description
System.Object defaultValue

The default value of the dependency property, usually provided as a value of a specific type.

Exceptions
Type Condition
System.ArgumentException

defaultValue is set to UnsetValue.

| Improve this Doc View Source

FrameworkPropertyMetadata(Object, FrameworkPropertyMetadataOptions)

Initializes a new instance of the FrameworkPropertyMetadata class with the provided default value and framework-level metadata options.

Declaration
public FrameworkPropertyMetadata(object defaultValue, FrameworkPropertyMetadataOptions flags)
Parameters
Type Name Description
System.Object defaultValue

The default value of the dependency property, usually provided as a value of a specific type.

FrameworkPropertyMetadataOptions flags

The metadata option flags (a combination of FrameworkPropertyMetadataOptions values). These options specify characteristics of the dependency property that interact with systems such as layout or data binding.

Exceptions
Type Condition
System.ArgumentException

defaultValue is set to UnsetValue.

| Improve this Doc View Source

FrameworkPropertyMetadata(Object, FrameworkPropertyMetadataOptions, PropertyChangedCallback)

Initializes a new instance of the FrameworkPropertyMetadata class with the provided default value and framework metadata options, and specified PropertyChangedCallback callback.

Declaration
public FrameworkPropertyMetadata(object defaultValue, FrameworkPropertyMetadataOptions flags, PropertyChangedCallback propertyChangedCallback)
Parameters
Type Name Description
System.Object defaultValue

The default value of the dependency property, usually provided as a value of a specific type.

FrameworkPropertyMetadataOptions flags

The metadata option flags (a combination of FrameworkPropertyMetadataOptions values). These options specify characteristics of the dependency property that interact with systems such as layout or data binding.

PropertyChangedCallback propertyChangedCallback

A reference to a handler implementation that the property system will call whenever the effective value of the property changes.

Exceptions
Type Condition
System.ArgumentException

defaultValue is set to UnsetValue.

| Improve this Doc View Source

FrameworkPropertyMetadata(Object, FrameworkPropertyMetadataOptions, PropertyChangedCallback, CoerceValueCallback)

Initializes a new instance of the FrameworkPropertyMetadata class with the provided default value and framework metadata options, and specified callbacks.

Declaration
public FrameworkPropertyMetadata(object defaultValue, FrameworkPropertyMetadataOptions flags, PropertyChangedCallback propertyChangedCallback, CoerceValueCallback coerceValueCallback)
Parameters
Type Name Description
System.Object defaultValue

The default value of the dependency property, usually provided as a specific type.

FrameworkPropertyMetadataOptions flags

The metadata option flags (a combination of FrameworkPropertyMetadataOptions values). These options specify characteristics of the dependency property that interact with systems such as layout or data binding.

PropertyChangedCallback propertyChangedCallback

A reference to a handler implementation that the property system will call whenever the effective value of the property changes.

CoerceValueCallback coerceValueCallback

A reference to a handler implementation that will be called whenever the property system calls CoerceValue(DependencyProperty) against this property.

Exceptions
Type Condition
System.ArgumentException

defaultValue is set to UnsetValue.

| Improve this Doc View Source

FrameworkPropertyMetadata(Object, PropertyChangedCallback)

Initializes a new instance of the FrameworkPropertyMetadata class with the provided default value and specified PropertyChangedCallback callback.

Declaration
public FrameworkPropertyMetadata(object defaultValue, PropertyChangedCallback propertyChangedCallback)
Parameters
Type Name Description
System.Object defaultValue

The default value of the dependency property, usually provided as a value of a specific type.

PropertyChangedCallback propertyChangedCallback

A reference to a handler implementation that the property system will call whenever the effective value of the property changes.

Exceptions
Type Condition
System.ArgumentException

defaultValue is set to UnsetValue.

| Improve this Doc View Source

FrameworkPropertyMetadata(Object, PropertyChangedCallback, CoerceValueCallback)

Initializes a new instance of the FrameworkPropertyMetadata class with the provided default value and specified callbacks.

Declaration
public FrameworkPropertyMetadata(object defaultValue, PropertyChangedCallback propertyChangedCallback, CoerceValueCallback coerceValueCallback)
Parameters
Type Name Description
System.Object defaultValue

The default value of the dependency property, usually provided as a specific type.

PropertyChangedCallback propertyChangedCallback

A reference to a handler implementation that the property system will call whenever the effective value of the property changes.

CoerceValueCallback coerceValueCallback

A reference to a handler implementation that will be called whenever the property system calls CoerceValue(DependencyProperty) for this dependency property.

Exceptions
Type Condition
System.ArgumentException

defaultValue is set to UnsetValue.

| Improve this Doc View Source

FrameworkPropertyMetadata(PropertyChangedCallback)

Initializes a new instance of the FrameworkPropertyMetadata class with the specified PropertyChangedCallback callback.

Declaration
public FrameworkPropertyMetadata(PropertyChangedCallback propertyChangedCallback)
Parameters
Type Name Description
PropertyChangedCallback propertyChangedCallback

A reference to a handler implementation that the property system will call whenever the effective value of the property changes.

| Improve this Doc View Source

FrameworkPropertyMetadata(PropertyChangedCallback, CoerceValueCallback)

Initializes a new instance of the FrameworkPropertyMetadata class with the specified callbacks.

Declaration
public FrameworkPropertyMetadata(PropertyChangedCallback propertyChangedCallback, CoerceValueCallback coerceValueCallback)
Parameters
Type Name Description
PropertyChangedCallback propertyChangedCallback

A reference to a handler implementation that the property system will call whenever the effective value of the property changes.

CoerceValueCallback coerceValueCallback

A reference to a handler implementation will be called whenever the property system calls CoerceValue(DependencyProperty) for this dependency property.

Properties

| Improve this Doc View Source

AffectsArrange

Gets or sets a value that indicates whether a dependency property potentially affects the arrange pass during layout engine operations.

Declaration
public bool AffectsArrange { get; set; }
Property Value
Type Description
System.Boolean

true if the dependency property on which this metadata exists potentially affects the arrange pass; otherwise, false. The default is false.

Exceptions
Type Condition
System.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.

| Improve this Doc View Source

AffectsMeasure

Gets or sets a value that indicates whether a dependency property potentially affects the measure pass during layout engine operations.

Declaration
public bool AffectsMeasure { get; set; }
Property Value
Type Description
System.Boolean

true if the dependency property on which this metadata exists potentially affects the measure pass; otherwise, false. The default is false.

Exceptions
Type Condition
System.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.

| Improve this Doc View Source

AffectsParentArrange

Gets or sets a value that indicates whether a dependency property potentially affects the arrange pass of its parent element's layout during layout engine operations.

Declaration
public bool AffectsParentArrange { get; set; }
Property Value
Type Description
System.Boolean

true if the dependency property on which this metadata exists potentially affects the arrange pass specifically on its parent element; otherwise, false. The default is false.

Exceptions
Type Condition
System.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.

| Improve this Doc View Source

AffectsParentMeasure

Gets or sets a value that indicates whether a dependency property potentially affects the measure pass of its parent element's layout during layout engine operations.

Declaration
public bool AffectsParentMeasure { get; set; }
Property Value
Type Description
System.Boolean

true if the dependency property on which this metadata exists potentially affects the measure pass specifically on its parent element; otherwise, false.The default is false.

Exceptions
Type Condition
System.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.

| Improve this Doc View Source

AffectsRender

Gets or sets a value that indicates whether a dependency property potentially affects the general layout in some way that does not specifically influence arrangement or measurement, but would require a redraw.

Declaration
public bool AffectsRender { get; set; }
Property Value
Type Description
System.Boolean

true if the dependency property on which this metadata exists affects rendering; otherwise, false. The default is false.

Exceptions
Type Condition
System.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.

Methods

| Improve this Doc View Source

Merge(PropertyMetadata, DependencyProperty)

Enables a merge of the source metadata with base metadata.

Declaration
protected override void Merge(PropertyMetadata baseMetadata, DependencyProperty dp)
Parameters
Type Name Description
PropertyMetadata baseMetadata

The base metadata to merge.

DependencyProperty dp

The dependency property this metadata is being applied to.

Overrides
PropertyMetadata.Merge(PropertyMetadata, DependencyProperty)
| Improve this Doc View Source

OnApply(DependencyProperty, Type)

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

Declaration
protected override void OnApply(DependencyProperty dp, Type targetType)
Parameters
Type Name Description
DependencyProperty dp

The dependency property to which the metadata has been applied.

System.Type targetType

The type associated with this metadata if this is type-specific metadata. If this is default metadata, this value can be null.

Overrides
PropertyMetadata.OnApply(DependencyProperty, Type)
  • Improve this Doc
  • View Source