I'm using helper from this article to create MaskedTextbox
and I have problem with \
character, if my mask contains this character
b:Masking.Mask="^[0-9]{1,4}\_$"
I get
'MaskExpression' property was registered as read-only and cannot be modified without an authorization key.
in XAML
file, but I can start application, after starting I get:
Additional information: analyzing "^[0-9]{1,4}\_$" - Unrecognized escape sequence \_.
At:
SetMaskExpression(textBox, new Regex(mask, RegexOptions.Compiled | RegexOptions.IgnorePatternWhitespace));
I have tried also using:
\\
\
Instead \
but it give this same result. How can I fix this?