WPF Masked Textbox with a value that does not contain a mask

I need a WPF text box that displays the phone number as "(555) 555-5555" but has the value "5555555555".

All the examples that I see have the ability to mask a control in the user interface, but this affects the bound property of my view model, so the value of the property has extraneous characters ().

+1
source share
2 answers

What about IValueConverter ?

+3
source

I think you will probably have to quit your own. It should not be too complicated, subclassed and redefined to get the results you are looking for.

-1

Source: https://habr.com/ru/post/1788900/


All Articles