WPF TextBox type Int binding properties

Int TextBox way binding properties when empty input box Setter method is not triggered.

My solution:

1, the attribute is set int ?;

2、xmlns:sys="clr-namespace:System;assembly=mscorlib"

3、Text="{Binding Number,Mode=TwoWay,TargetNullValue={x:Static sys:String.Empty},UpdateSourceTrigger=PropertyChanged}"

Guess you like

Origin www.cnblogs.com/bobyuanyuan/p/11201156.html