UIElement.ShouldSerializeInputBindings Method


返回序列化进程是否应在此类的实例上序列化 InputBindings 属性的内容。Returns whether serialization processes should serialize the contents of the InputBindings property on instances of this class.

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



如果应当序列化 InputBindings 属性值,则为 true;否则为 falsetrue if the InputBindings property value should be serialized; otherwise, false.


如果本地设置 InputBindings,这将返回 trueThis will return true if InputBindings is locally set.

提供此 ShouldSerialize 方法的原因是 InputBindings 属性没有简单的默认值。This ShouldSerialize method is provided because the InputBindings 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.

Applies to