Abhi
Abhi

Reputation: 5561

How to disable Undo in Rich Text Box in WPF?

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

Upvotes: 8

Views: 2912

Answers (2)

Mariusz
Mariusz

Reputation: 1409

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

Upvotes: 5

Frédéric Hamidi
Frédéric Hamidi

Reputation: 263147

You can use the IsUndoEnabled property:

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

Upvotes: 18

Related Questions