Textbox Mask Windows Community toolKit

Eduardo Gomez 3,196 Reputation points


I have a little problem

I am using this (https://learn.microsoft.com/en-us/windows/communitytoolkit/extensions/textboxextensions), but I do not know how to allowd like 50 characters in a tetbox

            Header="First Name"  
            ui:TextBoxExtensions.Mask="a" />  

if I put "a" I only accept 1 character and if I want to support 50 character, I would have to put "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", that is very messy xaml

Universal Windows Platform (UWP)
{count} votes

Accepted answer
  1. Roy Li - MSFT 31,266 Reputation points Microsoft Vendor


    Welcome to Microsoft Q&A!

    I've checked the document about the TextBoxExtensions. Currently, there is no way to directly add a 50 max limitation for the Textbox Mask and you still have to put these character manually. You could submit a feature request about this in Toolkit Github: https://github.com/CommunityToolkit/WindowsCommunityToolkit/issues

    Thank you.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful