TextBoxBase.Undo 메서드

정의

가장 최근의 실행 취소 명령을 취소합니다. 즉, 실행 취소 스택에서 가장 최근의 실행 취소 단위를 취소합니다.

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

반환

Boolean

실행 취소 작업에 성공하면 true이고, 그렇지 않으면 false입니다. 실행 취소 스택이 비어 있으면 이 메서드에서 false를 반환합니다.

예제

다음 예제에서는 Undo 메서드를 사용하는 방법을 보여 줍니다.

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

적용 대상

추가 정보