I'm doing the following to a TextEdit which is on a dialog form with a save and cancel button.
_underlyingEditor.Properties.Mask.EditMask = @"\((\d{3})\)-(\d{3})-(\d{4})";
_underlyingEditor.Properties.Mask.MaskType = MaskType.RegEx;
_underlyingEditor.Properties.Mask.UseMaskAsDisplayFormat = true;
_underlyingEditor.Properties.AutoHeight = false;
The problem is that if the user types a bad value into the editor then clicks Cancel the validation error shows and the screen doesn't close. I've tried tying into the cancel buttons click event to try to clear the value from the editor but it's not firing.
Has anyone figured out a way to handle this?