How to restrict the default validation in WinUI MaskedTextBox
21 Jun 20231 minute to read
The MaskedTextBox control provides the ability to validate the input according to the completion of masked input. By default, validation is enabled in the MaskedTextBox control. However, you can disable the validation by assigning true
to the IsValid
property of the ValueChanging event.
<syncfusion:SfMaskedTextBox x:Name="maskedTextBox"
Width="200"
MaskType="Simple"
Mask="000-000-0000"
ValueChanging="maskedTextBox_ValueChanging">
</syncfusion:SfMaskedTextBox>
private void maskedTextBox_ValueChanging(object sender, MaskedTextBoxValueChangingEventArgs e)
{
e.IsValid = true;
}