CanUndo Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Gets a value indicating whether the user can undo the previous operation in a Text Control.
Syntax
public bool CanUndo { get; }Public ReadOnly Property CanUndo As BooleanExamples
The following XAML example shows how to bind the CanUndo property to the IsEnabled attribute of a menu item.
<MenuItem
Header="Undo"
Command="ApplicationCommands.Undo"
IsEnabled="{Binding ElementName=textControl1, Path=CanUndo}" />The following example checks can undo before performing the related operation.
if (textControl.CanUndo)
{
textControl.Undo();
}If textControl.CanUndo Then
textControl.Undo()
End IfLimitations
Runtime only.
Read only.