In WPF textBox, enter does not add a new line

后端 未结 3 1762
北荒
北荒 2021-02-06 21:43

Text box is defined in following code:



        
3条回答
  •  囚心锁ツ
    2021-02-06 22:40

    What you have should work fine, assuming

    1. IsReadOnly is false. If you set this to true, then obviously the Enter key won't work.
    2. The control containing the TextBox is not clipping the TextBox, so it appears that the Enter key did not work.

    I'd suggest you try this outside of your project to get a better indication of the actual issue.

提交回复
热议问题