Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find a free masked TextBox in WPF? [closed]

Do you know any freely available WPF component for using masks (regex) in textbox?

like image 796
Victor Rodrigues Avatar asked Jan 26 '09 19:01

Victor Rodrigues


People also ask

What is masked text box?

The MaskedTextBox class is an enhanced TextBox control that supports a declarative syntax for accepting or rejecting user input. Using the Mask property, you can specify the following input without writing any custom validation logic in your application: Required input characters.

Which property is used for masking text in TextBox control?

Like the regular text box, the masked text box uses the AsciiOnly property, which indicates whether the control should accept or allow only ASCII characters.

What is TextBox in WPF?

WPF TextBox control represent a control that can be used to display or edit unformatted text. The TextBox class in C# represents the control. The XAML <TextBox> element represents the TextBox control in UI. The code samples in this article show how to use XAML TextBox element to create a TextBox control in WPF and C#.


2 Answers

I think you will find what you need in this control library: http://www.codeplex.com/WPFDeveloperTools

Look for 'FilteredTextBox' amongst all the other useful controls. I don't think it does regex, but it should be able to filter just about everything you need, and since you will have the source, you should find it easy to enhance.

As a bonus, it is free and open source on CodePlex.

You can also find a nice blog post about how to go about implementing this yourself here: http://marlongrech.wordpress.com/2007/10/28/masked-textbox/

like image 121
GEOCHET Avatar answered Sep 20 '22 17:09

GEOCHET


Extended WPF Toolkit has a MaskedTextBox similar to the one that was in WinForms. As with the old one, this doesn't actually support RegExes, but has a subset of useful masks.

Oh, and it's on NuGet, which is nice.

like image 20
Pat Avatar answered Sep 16 '22 17:09

Pat