如何在文本框中删除默认初始值零(绑定到十进制) [英] How to remove default initial value zero in text box (bind to decimal)
本文介绍了如何在文本框中删除默认初始值零(绑定到十进制)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
公共小数量{get; set;}
textbox text ={Binding quantity}
public decimal quantity{get;set;}
textbox text="{Binding quantity}"
推荐答案
将数量属性设为Nullable:
Make quantity property as Nullable:
public decimal? quantity {get;set;}
这篇关于如何在文本框中删除默认初始值零(绑定到十进制)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文