Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
TextBox,我想要一个输入键来插入一个 CR LF。走到这一步:
<TextBox Height="auto" KeyDown="TextBox_KeyDown" TextWrapping="Wrap"/>
<TextBox Height="auto" KeyDown="TextBox_KeyDown" TextWrapping="Wrap"/
谢谢
添加AcceptReturn属性
AcceptReturn
<TextBox Height="auto" KeyDown="TextBox_KeyDown" TextWrapping="Wrap" AcceptsReturn="True"/>
请参阅http://msdn.microsoft.com/en-us/library/ms742157.aspx