TextBoxBase.CanUndo 속성

정의

가장 최근 작업을 취소할 수 있는지 여부를 나타내는 값을 가져옵니다.

public:
 property bool CanUndo { bool get(); };
public bool CanUndo { get; }
member this.CanUndo : bool
Public ReadOnly Property CanUndo As Boolean

속성 값

Boolean

true가장 최근 작업을 실행 취소할 수 있으면 이고, 그렇지 않으면 . false

이 속성에는 기본값이 없습니다.

예제

다음 코드 예제에서는 속성을 사용 하 여 CanUndo 가장 최근 작업을 실행 취소할 수 있는지 여부를 확인 하는 방법을 보여 줍니다.

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

적용 대상

추가 정보