UIElement.ShouldSerializeCommandBindings UIElement.ShouldSerializeCommandBindings UIElement.ShouldSerializeCommandBindings UIElement.ShouldSerializeCommandBindings Method


傳回序列化 (Serialization) 處理序是否應該在這個類別的執行個體上,將 CommandBindings 屬性的內容序列化。Returns whether serialization processes should serialize the contents of the CommandBindings property on instances of this class.

 bool ShouldSerializeCommandBindings();
public bool ShouldSerializeCommandBindings ();
member this.ShouldSerializeCommandBindings : unit -> bool
Public Function ShouldSerializeCommandBindings () As Boolean


如果應序列化 CommandBindings 屬性值,則為 true,否則為 falsetrue if the CommandBindings property value should be serialized; otherwise, false.


這會傳回true如果CommandBindings本機設定。This will return true if CommandBindings is locally set.

ShouldSerialize提供方法,因為CommandBindings屬性並沒有簡單的預設值。This ShouldSerialize method is provided because the CommandBindings property does not have a simple default value. 這個方法會指出屬性是否已變更其預設值。This method indicates whether the property has changed from its default value. 您通常叫用這個方法如果在開發設計工具或開發您自己的控制項併入UIElementYou typically invoke this method if you are either developing a designer or developing your own control incorporating a UIElement.

如需詳細資訊,請參閱 < 定義預設值使用 ShouldSerialize 和重設方法For more information, see Defining Default Values with the ShouldSerialize and Reset Methods.