TextBoxBase.IsUndoEnabled Property

Gets or sets a value that indicates whether undo support is enabled for the text-editing control.

Namespace: System.Windows.Controls.Primitives
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public bool IsUndoEnabled { get; set; }
/** @property */
public boolean get_IsUndoEnabled ()

/** @property */
public void set_IsUndoEnabled (boolean value)

public function get IsUndoEnabled () : boolean

public function set IsUndoEnabled (value : boolean)

<object IsUndoEnabled="bool" .../>

Property Value

true to enable undo support; otherwise, false. The default value is true.

Setting this property to false clears the undo stack, therefore, if you disable undo and then re-enable it, undo commands will still not work because the undo stack was emptied when you disabled undo.

The following example demonstrates how to use the IsUndoEnabled property in Extensible Application Markup Language (XAML).

<TextBox TextWrapping="Wrap"

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0