extensions:TextBoxRegex.ValidationType="Number" in UWP, still taking whitespaces after a single number entered, why?

Sharath HG 0 Reputation points
2023-01-17T13:08:47.9066667+00:00

In UWP windows app,
I have used this
extensions:TextBoxRegex.ValidationMode="Dynamic"
extensions:TextBoxRegex.ValidationType="Number"
to dynamically remove whitespaces, letters and any special characters dynamically. Initially it's not allowing whitespaces but after entering a single digit it's taking whitespaces. Can anyone help me with this issue?


<TextBox
                    Grid.Row="0"
                    Grid.Column="2"
                    HorizontalAlignment="Stretch"
                    extensions:TextBoxRegex.ValidationMode="Dynamic"
                    extensions:TextBoxRegex.ValidationType="Number"
                    IsEnabled="{Binding IsDataPresent, Mode=TwoWay}"
                    Style="{StaticResource FieldValueCommonTextBoxStyle}"
                    Text="{Binding DeliveryDocInputHeader.DELIVERY_NO, Mode=TwoWay}" />
Universal Windows Platform (UWP)
{count} votes