I creating multiline TextBox with this Link its work better but if I want to set TextBox text counter
label1.Content = textBox1.Text.Length;
with above line work fine but problem is that when I press enter in the TextBox counter it will increase 2 characters in TextBox counter.
How can I do this task please help me.
Any help appreciated!
Sumit Kesarwani
03-Sep-2013If you need just one character on "Enter" then you can just handle PreviewKeyDown event on TextBox and paste following handler: