WPF控件textBox多行输入设置
生活随笔
收集整理的這篇文章主要介紹了
WPF控件textBox多行输入设置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
將 TextWrapping 屬性設置為 Wrap 會導致輸入的文本在到達 TextBox 控件的邊緣時換至新行,必要時會自動擴展 TextBox 控件以便為新行留出空間。
將 AcceptsReturn 屬性設置為 true 會導致在按 Return 鍵時插入新行,必要時會再次自動擴展 TextBox 以便為新行留出空間。
VerticalScrollBarVisibility 屬性向 TextBox 添加一個滾動條,以便在 TextBox 超出包含它的框架或窗口的大小時,可以滾動 TextBox 的內容。
?
<TextBoxName="tbMultiLine"TextWrapping="Wrap"AcceptsReturn="True"VerticalScrollBarVisibility="Visible" >This TextBox will allow the user to enter multiple lines of text. When the RETURN key is pressed, or when typed text reaches the edge of the text box, a new line is automatically inserted. </TextBox>?
示例出處:http://blog.csdn.net/cryeyes/archive/2009/10/21/4707386.aspx
轉載于:https://www.cnblogs.com/songhang520/p/5630657.html
總結
以上是生活随笔為你收集整理的WPF控件textBox多行输入设置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Buy Tickets(poj 2828
- 下一篇: 富文本NSMutableAttribut