How to disable Undo in Rich Text Box in WPF?

天涯浪子 提交于 2021-02-07 12:32:02

问题


I want to disable undo redo feature of textbox and richtextbox. Please tell how to do this.


回答1:


Set the UndoLimit property of your Textbox to 0. Should work.




回答2:


You can use the IsUndoEnabled property:

<TextBox Name="yourTextBox" IsUndoEnabled="False" />


来源:https://stackoverflow.com/questions/6732586/how-to-disable-undo-in-rich-text-box-in-wpf

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!