RadMaskedTextInput and CharacterCasing without Mask

2 posts, 0 answers
  1. Lukasz
    Lukasz avatar
    28 posts
    Member since:
    Aug 2014

    Posted 07 Aug 2015 Link to this post


    I am trying to replace TextBox that had CharacterCasing="Upper" with RadMaskedTextInput.

    I do not want to have placeholders, so I cannot use Mask=">a10"

    Is there any other way to change charaters to upper when typing into RadMaskedTextInput?



  2. Petar Mladenov
    Petar Mladenov avatar
    2991 posts

    Posted 11 Aug 2015 Link to this post

    Hi Lukasz,

    There is no out of the box way to set up uppercasing in no-masked RadMaskedTextInput.

    However, you can try the following code if it is applicable at your side:
        <telerik:RadMaskedTextInput Mask=""
                                            Width="300" x:Name="mask"/>
    private void mask_ValueChanging(object sender, Telerik.Windows.Controls.MaskedInput.RadMaskedInputValueChangingEventArgs e)
                if (e.NewValue == null)
                string newValue = e.NewValue.ToString();
                if (newValue.Length > 0)
                    newValue = newValue.ToUpper();
                this.mask.ValueChanging -= this.mask_ValueChanging;
                this.mask.Value = newValue;
                this.mask.ValueChanging += this.mask_ValueChanging;

    We hope it will meet your requirements.

    Petar Mladenov
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top