locked
WPF TextBox, limit number of character RRS feed

  • Question

  •  

    hi,

    I want to limit the number of character to 10 in TextBox.

    Can I do it without event? Does TextBox tag have appropriate attribute ?

    thanks!

    Thursday, March 27, 2008 12:03 PM

Answers

  • TextBox txtBox = new TextBox();

    txtBox.MaxLengh = [Your Restriction];

     

    Thursday, March 27, 2008 1:37 PM

All replies

  • TextBox txtBox = new TextBox();

    txtBox.MaxLengh = [Your Restriction];

     

    Thursday, March 27, 2008 1:37 PM
  • thanks!

    • Proposed as answer by John D. Delizo Thursday, August 23, 2012 5:12 AM
    • Unproposed as answer by John D. Delizo Thursday, August 23, 2012 5:12 AM
    Thursday, March 27, 2008 2:46 PM
  • Awesome! I knew this had to be easy :)
    Monday, March 12, 2012 6:57 PM