How to define an all capital letters mask

4 posts, 1 answers
  1. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 24 Feb Link to this post

    Hi,

    I am trying to define a mask for a meskedinput control as all capital and required letters so normally I would be using something like ">LLL" as the mask.

    You mention in your documentation that ">" should be escaped in XAML so I have set the mask property as ">LLL" 

    <telerik:RadMaskedTextInput Name="rmb_SMS_CODE"
                    HorizontalAlignment="Center"
                    Margin="0,10,0,20"               
                    AcceptsReturn="True"
                    Mask= "&gt;LLL">
                </telerik:RadMaskedTextInput>

    But this does not work, it does not even work if I define the mask in code as this.mymaskcontrol.mask = ">LLL". The control ignores the capitalisation.

    Can you please provide me with some assistance on what I am doing wrong?

    Thank you,

  2. Answer
    Dinko
    Admin
    Dinko avatar
    204 posts

    Posted 29 Feb Link to this post

    Hi George,

    Thank you for contacting us.

    In order to achieve the desired behavior, you can just specify how many symbols to be required. Basically, you have to add a number after the "L" required symbol and set the AllowInvalidValues property to true. Check the code snippet below:
    <telerik:RadMaskedTextInput Name="rmb_SMS_CODE"
                    HorizontalAlignment="Center"
                    Margin="0,10,0,20"              
                    AcceptsReturn="True"
                    Mask= "&gt;L3"
                    AllowInvalidValues="True">
                </telerik:RadMaskedTextInput>

    Give this approach a try and let us know if you have any additional questions.

    Regards,
    Dinko
    Telerik
    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 29 Feb in reply to Dinko Link to this post

    Thank you, that worked just fine, I suggest you include these remarks to your online documentation since it is not that clear, the control works differently with the windows forms version for example.

     

    Kind Regards,

     

    George

  5. Dinko
    Admin
    Dinko avatar
    204 posts

    Posted 03 Mar Link to this post

    Hello George,

    We appreciate any feedback given from our customers. We will update our documentation to better describe the mentioned behavior. We have also updated your Telerik points as a small appreciation for your cooperation.

    Regards,
    Dinko
    Telerik
    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