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

TextBoxInputMaskBehavior value Binding (Binding withouth the Mask) #147

Open
JackDjTom opened this issue Aug 2, 2021 · 0 comments
Open

Comments

@JackDjTom
Copy link

JackDjTom commented Aug 2, 2021

Hi,
my code looks like this:

<TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
  <b:Interaction.Behaviors>
    <controlzex:TextBoxInputMaskBehavior InputMask="aaaa - aaaa" PromptChar="_" />
  </b:Interaction.Behaviors>
</TextBox>

The binding back to the property is including the InputMask. For example, when I enter 'xxxxyyyy', the Text property is set to 'xxxx - yyyy'. What I need, however, is just the value without the mask ('xxxxyyyy'). Can I accomplish that with the TextBoxInputMaskBehavior?

The Text property is basic string property:
public string Text { get; set; }

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

1 participant