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.

備註

此篩選機制只會由自訂 DependencyPropertyDescriptor 實作為 DependencyObjectThis 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. 在方格中填入屬性方格和包含附加屬性的設計工具應用程式,必須檢查這些屬性的值或存在,以及目前元素與附加的父系或子項目的相對位置property.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.

適用於

另請參閱