TextBoxBase.Redo 方法

定义

撤消最新的撤消命令。Undoes the most recent undo command. 换句话说,重做撤消堆栈上的最新撤消单元。In other words, redoes the most recent undo unit on the undo stack.

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

返回

如果重做操作成功,则为 true,否则为 falsetrue if the redo operation was successful; otherwise, false. 如果没有可用的撤消命令(撤消堆栈为空),则此方法返回 falseThis method returns false if there is no undo command available (the undo stack is empty).

示例

下面的示例演示如何使用 Redo 方法。The following example demonstrates how to use the Redo method.

private void redoAction(object sender, RoutedEventArgs e)
{
    if (myTextBox.CanRedo == true)
    {
        myTextBox.Redo();
    }
}
Private Sub redoAction(ByVal sender As Object, ByVal e As RoutedEventArgs)

    If myTextBox.CanRedo = True Then
        myTextBox.Redo()
    Else : Return
    End If
End Sub

适用于

另请参阅