TextBoxBase.Undo TextBoxBase.Undo TextBoxBase.Undo TextBoxBase.Undo Method

定義

最新の undo コマンドを元に戻します。Undoes the most recent undo command. つまり、最新の undo 単位を元に戻すスタックを元に戻します。In other words, undoes the most recent undo unit on the undo stack.

public:
 bool Undo();
public bool Undo ();
member this.Undo : unit -> bool
Public Function Undo () As Boolean

戻り値

true 元に戻す操作が成功した場合それ以外の場合、falseします。true if the undo operation was successful; otherwise, false. このメソッドが戻るfalseundo スタックが空の場合。This method returns false if the undo stack is empty.

Undo メソッドの使用方法を次の例に示します。The following example demonstrates how to use the Undo method.

private void undoAction(object sender, RoutedEventArgs e)
{
    if (myTextBox.CanUndo == true)
    {
        myTextBox.Undo();
    }
}
Private Sub undoAction(ByVal sender As Object, ByVal e As RoutedEventArgs)
    If myTextBox.CanUndo = True Then
        myTextBox.Undo()
    Else : Return
    End If
End Sub

適用対象

こちらもご覧ください