Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaskedTextBox.Mask: Optional characters not allowed #1777

Open
JuliaVasileva opened this issue Jul 22, 2024 · 2 comments
Open

MaskedTextBox.Mask: Optional characters not allowed #1777

JuliaVasileva opened this issue Jul 22, 2024 · 2 comments

Comments

@JuliaVasileva
Copy link

JuliaVasileva commented Jul 22, 2024

Hi,
I've been trying to create Mask for MaskedTextBox and faced a problem with optional characters.

The control seems to treat optional digits as mandatory.

Specifically:

Mask="N #90°" - where the 2 digits before the degree symbol are optional

However, values such as N 8° or N 12° are not valid

To make it valid, I need to input values with additional spaces like 'N 3°'

image

Hot to allow users to input values of different lengths without requiring additional spaces?

@zhongruijia
Copy link

zhongruijia commented Jul 22, 2024 via email

@XceedBoucherS
Copy link
Collaborator

Hi,

How about using a prompt char of Empty:
<xctk:MaskedTextBox Mask="N #90°" PromptChar="" HorizontalAlignment="Center" VerticalAlignment="Center"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants