7 : ConvertBack cannot convert value '' (type 'String'). BindingExpression:Path=AIntVariable; DataItem='MainViewModel' (HashCode=xxxxxxxx); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String') FormatException:'System.FormatException: Input string was not in a correct format.
Expected behavior
Add a judgment for the empty string. The value can be set to 0 if it is empty.
Screenshots
Environment (please complete the following information):
Describe the bug When setting the property ShowClearButton="True" for the control hc:TextBox, Click on the Clear button throws an exception.
To Reproduce Steps to reproduce the behavior:
7 : ConvertBack cannot convert value '' (type 'String'). BindingExpression:Path=AIntVariable; DataItem='MainViewModel' (HashCode=xxxxxxxx); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String') FormatException:'System.FormatException: Input string was not in a correct format.
Expected behavior Add a judgment for the empty string. The value can be set to 0 if it is empty.
Screenshots
Environment (please complete the following information):
ps: The above is translated from DeepL.