UIElement.ShouldSerializeCommandBindings 方法

定義

傳回序列化 (Serialization) 處理序是否應該在這個類別的執行個體上,將 CommandBindings 屬性的內容序列化。

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

傳回

Boolean

如果應序列化 CommandBindings 屬性值,則為 true,否則為 false

備註

如果在 CommandBindings 本機設定,這會傳回 true

因為 屬性沒有簡單的預設值, CommandBindings 所以會提供這個 ShouldSerialize 方法。 這個方法會指出屬性是否已從其預設值變更。 如果您要開發設計工具或開發自己的控制項併入 UIElement ,您通常會叫用這個方法。

如需詳細資訊,請參閱 使用 ShouldSerialize 和 Reset 方法定義預設值

適用於