IsUndoEnabled Property

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)

public bool IsUndoEnabled { get; set; }

Property Value

Type: System.Boolean

true if undo support is enabled; 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 still do not work because the undo stack was emptied when you disabled undo.

Identifier field

IsUndoEnabledProperty

Metadata properties set to true

None

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

<TextBox TextWrapping="Wrap"
         Name="myTextBox" 
         Width="500" 
         Height="200" 
         AcceptsReturn="True"
         IsUndoEnabled="True"
         VerticalScrollBarVisibility="Visible"
         HorizontalScrollBarVisibility="Auto" 
         Margin="25">

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft