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


返回序列化进程是否应在此类的实例上序列化 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. 如果要开发设计器或开发自己的包含的UIElement控件, 通常需要调用此方法。You typically invoke this method if you are either developing a designer or developing your own control incorporating a UIElement.

有关详细信息, 请参阅用 ShouldSerialize 和 Reset 方法定义默认值For more information, see Defining Default Values with the ShouldSerialize and Reset Methods.