Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1485
"Blanking" a value in the XamNumericEditor
posted

Hi,

I have a simple XamNumericEditor:

                <igEditors:XamNumericEditor
                    x:Name="RequestNumberEditor"
                    Mask="9999999"
                    HorizontalContentAlignment="Right"
                    EditModeStarted="RequestNumberEditor_EditModeStarted"
                    Text="{Binding Path=RequestNumber, Mode=TwoWay}"
                    />

This works fine if I enter a value, say 112.  However, if I remove the value (e.g. select all and then del or backspace), the value "112" is still kept in the Text and Value properties of the control, even though a blank value is shown on screen (interestingly, when looking at this using Snoop, the value is still displayed on screen...)  If I delete the digits one by one, then the last digit deleted (e.g. "1") is kept in the Text/Value properties.

The actual type of "RequestNumber" is Nullable(Of Integer), so I would expect the control to be able to handle a null value here.  Note all the EditModeStarted handler does is this: CType(sender, ISupportsSelectableText).SelectAll() to that the value is selected when the user clicks on the control.

I must be missing something obvious here...

Thanks,
Michel