Absent Member.
Absent Member.
1845 views

WPF and the lack of masked textbox

Jump to solution

[Migrated content. Thread originally posted on 04 November 2011]

We are new to Visual Cobol and have toyed around with building an application in Winforms as well as WPF in order to figure out which to embrace. We have leaned towards WPF but we are running into situations where Winforms has options for a Masked Textbox and WPF does not. All of the internet searches reveal that WPF is much more difficult in handling these situations. An oversighte on Microsofts part? Our simple application has a textbox defined, the maximum is 9 positions. All we want to do is ensure that we have either nothing in the textbox, including no spaces, or we have 9 numerics only, no alpha or spaces allowed. How would you handle this in WPF? How can we handle a simple phone number so that the textbox has "( ) - " to start and the masking will only allow either nothing or a format of "(123)456-7890"?
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert
There are several 3rd party tools out there that can be downloaded that support these types of controls in WPF.

One that looks promising can be found here:

Extended WPF Toolkit

There is also a method where you can host Windows Forms controls on a WPF form.

See this article:

Thanks.

View solution in original post

0 Likes
2 Replies
Absent Member.
Absent Member.
Good question. I was doing battle with that problem too, working with Eclipse under Unix.
0 Likes
Micro Focus Expert
Micro Focus Expert
There are several 3rd party tools out there that can be downloaded that support these types of controls in WPF.

One that looks promising can be found here:

Extended WPF Toolkit

There is also a method where you can host Windows Forms controls on a WPF form.

See this article:

Thanks.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.