Alex Rivera | Logout

WPF Edit Mask

Asked 2009-02-10T21:38:06.910
9

What is the easiest way to specify an edit mask in WPF for a simple Text Box?

e.g. one that transforms 10000 to 10,000 as you type.

Edit
Report

1 Answer

4

Short answer, there is no easy way. If you use masks quite often, I would recommend creating your own control with masking functionality. Using the MaskedTextProvider class should be fairly straightforward.

See the following for an example of a custom TextBox with masking capabilities:

Masked TextBox example...

answered 2009-02-11T00:08:05.617

Your Answer