TextBoxBase.Redo 方法

定義

復原最近一次的復原指令。 換句話說,重新執行復原堆疊上的最新復原單位。

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

傳回

Boolean

如果取消復原作業成功,則為 true,否則為 false。 如果沒有可用的復原指令 (復原堆疊為空白),此方法會傳回 false

範例

下列範例示範如何使用 Redo 方法。

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

適用於

另請參閱