wpf中textbox换行解决方法
来源:互联网 发布:php字符串截取 编辑:程序博客网 时间:2024/05/17 22:28
<TextBox HorizontalAlignment="Left" Height="76" Margin="0,378,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="483" Text="{Binding test,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AcceptsReturn="True">
<TextBox.InputBindings>
<KeyBinding Key="Return" Modifiers="Shift"></KeyBinding>
<KeyBinding Key="Return" Command="{Binding command}"></KeyBinding>
</TextBox.InputBindings>
<TextBox.InputBindings>
<KeyBinding Key="Return" Modifiers="Shift"></KeyBinding>
<KeyBinding Key="Return" Command="{Binding command}"></KeyBinding>
</TextBox.InputBindings>
</TextBox>
换行设置AcceptsReturn="True"
AcceptsReturn的默认响应key为回车键(Enter),如果想改成其他键盘如下设置
<TextBox.InputBindings>
<KeyBinding Key="Return" Modifiers="Shift"></KeyBinding> 改成shift+enter
<KeyBinding Key="Return" Command="{Binding command}"></KeyBinding> enter触发后台方法.command为后台binding方法(一定要加上红色字体)。
</TextBox.InputBindings>
阅读全文
0 0
- wpf中textbox换行解决方法
- wpf Textbox 回车就换行
- c#textBox中换行
- C# 中 TextBox 换行
- c# 中textbox换行符
- C#中TextBox实现换行
- TextBox文本框中如何换行
- C#中TextBox实现换行
- winphone中TextBox自动换行
- C#中TextBox实现换行
- TextBox 中换行的实现
- C#中TextBox实现换行
- C#中textbox输出换行
- Silverlight中TextBox内容换行
- wpf中textbox绑定list
- C# 中实现textbox的换行
- C#多行TEXTBOX中插入换行符
- Wpf 中TextBox 自动滚动到底部
- 2017 Multi-University Training Contest
- KahaDB简介
- JAVA 抛出java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符 异常
- 有()个2012位数,其任意两个邻数位依序依序构成的两位数均能被17或23整除。
- App主流框架UINavigationController && UITabBarController的简单使用
- wpf中textbox换行解决方法
- ligerTree的使用
- CC2640 SNV
- memcached 的安装以及简单使用
- Java.lang.StackOverflowError
- 微信小程序request请求后台接口php简单实例
- 前端-浏览器常见兼容性问题以及解决方案
- Swift 3必看:新的访问控制fileprivate和open
- 可循环使用的屏障CyclicBarrier