Start a new line in wpf textbox

前端 未结 3 1628
情书的邮戳
情书的邮戳 2021-01-07 16:34

I created a small GUI with WPF, containing a Textbox. I want the user to have the ability to start a new line . How do I let the user start a new line in the WPF textbox (wi

3条回答
  •  迷失自我
    2021-01-07 17:02

    The textbox control has an "AcceptsReturn" property (True/False) that you need to set to True.

    You can set it in the Visual Studio IDE Properties box or you can set it within the code.

    textbox1.AcceptsReturn = true;
    

提交回复
热议问题