Binding.FormattingEnabled Binding.FormattingEnabled Binding.FormattingEnabled Binding.FormattingEnabled Property


获取或设置一个值,该值指示是否对控件属性数据应用类型转换和格式设置。Gets or sets a value indicating whether type conversion and formatting is applied to the control property data.

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


如果已针对控件属性数据启用类型转换和格式设置,则为 true;否则为 falsetrue if type conversion and formatting of control property data is enabled; otherwise, false. 默认值为 falseThe default is false.


如果将此属性true设置为, 则还BindingComplete会启用错误处理行为, 并引发事件。Setting this property to true also enables error-handling behavior and causes the BindingComplete event to be raised. 此事件的处理程序可以根据绑定过程中的成功、错误或异常, 采取相应的操作, 方法是检查BindingCompleteState BindingCompleteEventArgs参数的属性。The handler of this event can take the appropriate action, based on the success, error, or exceptions in the binding process, by examining the BindingCompleteState property of the BindingCompleteEventArgs parameter.