PropertyFilterOptions PropertyFilterOptions PropertyFilterOptions PropertyFilterOptions Enum

定义

指定哪些属性应由类型描述符报告,尤其是 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
继承
PropertyFilterOptionsPropertyFilterOptionsPropertyFilterOptionsPropertyFilterOptions
属性

字段

All All All All 15

返回所有属性。Return all properties.

Invalid Invalid Invalid Invalid 1

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

None None None None 0

不返回任何属性Return no properties

SetValues SetValues SetValues SetValues 2

仅返回当前设置了本地值的属性。Return only those properties that have local values currently set.

UnsetValues UnsetValues UnsetValues 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 Valid Valid Valid 8

返回在当前范围内的对象上有效的任何属性。Return any property that is valid on the object in the current scope.

注解

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

无效和有效的附加属性相关。Invalid and Valid are relevant only for attached properties. 属性的有效性由使用的以下属性: AttachedPropertyBrowsableForChildrenAttributeAttachedPropertyBrowsableForTypeAttributeAttachedPropertyBrowsableWhenAttributePresentAttribute用于在对象树中一次定义附加属性的预期使用范围XAMLXAML加载。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. 所有者 setter 关系以及属性值和PropertyFilterOptions将定义一个元素设置给定附加的属性是否有效或无效。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.

适用于

另请参阅