FrameworkPropertyMetadata.SubPropertiesDoNotAffectRender FrameworkPropertyMetadata.SubPropertiesDoNotAffectRender FrameworkPropertyMetadata.SubPropertiesDoNotAffectRender FrameworkPropertyMetadata.SubPropertiesDoNotAffectRender Property

定義

取得或設定值,指出相依性屬性的子屬性是否不會影響包含物件的呈現。Gets or sets a value that indicates whether sub-properties of the dependency property do not affect the rendering of the containing object.

public:
 property bool SubPropertiesDoNotAffectRender { bool get(); void set(bool value); };
public bool SubPropertiesDoNotAffectRender { get; set; }
member this.SubPropertiesDoNotAffectRender : bool with get, set
Public Property SubPropertiesDoNotAffectRender As Boolean

屬性值

如果子屬性值變更不會影響呈現,則為true ;否則為 falsetrue if changes to sub-property values do not affect rendering if changed; otherwise, false. 預設為 falseThe default is false.

例外狀況

中繼資料已套用至相依性屬性作業,因此中繼資料已密封,而且無法設定中繼資料的屬性。The metadata has already been applied to a dependency property operation, so that metadata is sealed and properties of the metadata cannot be set.

備註

這個中繼資料選項與屬於參考型別的相依性屬性有關, 其中該類型具有自己的屬性值。This metadata option is pertinent for dependency properties that are reference types, where that type has property values of its own. 一般而言, 配置系統邏輯會假設任何具有子屬性的相依性屬性可能會影響版面配置, 因為檢查變更的所有子屬性, 比實際執行另一個轉譯行程更費時。Typically, the layout system logic is to assume that any dependency property with sub-properties potentially will affect layout, because checking all sub-properties for changes is more time consuming than actually running another render pass. 將此選項設定true為, 對於優化 WPF 架構層級配置系統的效能很有説明。Setting this option to true is useful for optimizing performance of the WPF framework level layout system implementation.

衍生類別上的PropertyMetadata屬性通常會在物件模型中定義為讀寫。Properties on derived classes of PropertyMetadata are typically defined in the object model as read-write. 如此一來, 就可以在初始化實例之後調整。This is so they can be adjusted after initialization of the instance. 不過, 一旦使用中繼資料做為RegisterAddOwnerOverrideMetadata呼叫的一部分, 屬性系統就會密封該中繼資料實例, 而傳達中繼資料細節的屬性現在會被視為不變。However, once the metadata is consumed as part of a call to Register, AddOwner, or OverrideMetadata, the property system will seal that metadata instance and properties that convey the specifics of the metadata are now considered immutable. 嘗試在這個中繼資料實例IsSealedtrue設定這個屬性之後, 就會引發例外狀況。Attempting to set this property after IsSealed is true on this metadata instance will raise an exception.

XAML 文字使用方式XAML Text Usage

這個類別的成員通常不會在中XAMLXAML使用。Members of this class are not typically used in XAMLXAML.

適用於

另請參閱