Rediger

Del via


PropertyFilterOptions Enum

Definition

Specifies which properties should be reported by type descriptors, specifically the GetProperties(Object) method. This enumeration is used to specify the value of the Filter property.

This enumeration supports a bitwise combination of its member values.

public enum class PropertyFilterOptions
[System.Flags]
public enum PropertyFilterOptions
[<System.Flags>]
type PropertyFilterOptions = 
Public Enum PropertyFilterOptions
Inheritance
PropertyFilterOptions
Attributes

Fields

Name Value Description
None 0

Return no properties.

Invalid 1

Return only those properties that are not valid given the current context of the object.

SetValues 2

Return only those properties that have local values currently set.

UnsetValues 4

Return only those properties whose local values are not set, or do not have properties set in an external expression store (such as binding or deferred resource).

Valid 8

Return any property that is valid on the object in the current scope.

All 15

Return all properties.

Remarks

This filter mechanism is only implemented by the custom DependencyPropertyDescriptor for DependencyObject.

Invalid and Valid are relevant only for attached properties. The validity of a property is determined by working with the following attributes: AttachedPropertyBrowsableForChildrenAttribute , AttachedPropertyBrowsableForTypeAttribute, AttachedPropertyBrowsableWhenAttributePresentAttribute which define the intended scope of the attached property in the object tree once the XAML is loaded. Designer applications that populate property grids and include attached properties in the grid must examine the value or presence of these attributes and the relative position of the current element versus either a parent or child element that "owns" the attached property. The owner-setter relationship together with the attribute values and PropertyFilterOptions will define whether a given attached property that is set on an element is valid or invalid.

Applies to

See also