TextBoxBase.Undo 메서드

정의

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

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

반품

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

예제

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

private void undoAction(object sender, RoutedEventArgs e)
{
    if (myTextBox.CanUndo)
    {
        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

적용 대상

추가 정보