PropertyFilterOptions 枚举

定义

指定哪些属性应由类型描述符报告,尤其是 GetProperties(Object) 方法。 此枚举用于指定 Filter 属性的值。This enumeration is used to specify the value of the Filter property.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class PropertyFilterOptions
[System.Flags]
public enum PropertyFilterOptions
type PropertyFilterOptions = 
Public Enum PropertyFilterOptions
继承
PropertyFilterOptions
属性

字段

All 15

返回所有属性。Return all properties.

Invalid 1

仅返回在对象的给定当前上下文中无效的属性。Return only those properties that are not valid given the current context of the object.

None 0

不返回任何属性。Return no properties.

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.

注解

此筛选器机制仅由 DependencyObject 的自定义 DependencyPropertyDescriptor 实现。This filter mechanism is only implemented by the custom DependencyPropertyDescriptor for DependencyObject.

无效和有效仅与附加属性相关。Invalid and Valid are relevant only for attached properties. 属性的有效性由以下特性确定: AttachedPropertyBrowsableForChildrenAttributeAttachedPropertyBrowsableForTypeAttributeAttachedPropertyBrowsableWhenAttributePresentAttribute,在加载 @no__t 后,将在对象树中定义所需的附加属性范围。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 XAMLXAML 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. 与属性值和 PropertyFilterOptions 的所有者-setter 关系将定义在元素上设置的给定附加属性是有效的还是无效的。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.

适用于

另请参阅