textbox双向绑定int属性,清空输入框时setter方法未触发。
我的解决方案:
1、属性置为int?;
2、xmlns:sys=”clr-namespace:system;assembly=mscorlib”
3、text=”{binding number,mode=twoway,targetnullvalue={x:static sys:string.empty},updatesourcetrigger=propertychanged}”
黄山市民网:https://www.huangshanshimin.com/