0
How to limit the number of characters in a Textbox
in xaml
and via code behind
?
0
How to limit the number of characters in a Textbox
in xaml
and via code behind
?
0
It’s quite simple:
in Xaml
add:
MaxLength="500"
and in code c#:
NomeDoTextBox.MaxLength = 500;
If you have many textbox you can create a variable with this value:
public const int TamMaxCaracteres = 500;
NomeDoTextBox.MaxLength = TamMaxCaracteres;
Browser other questions tagged c# wpf xaml
You are not signed in. Login or sign up in order to post.