Property RedoList
RedoList
Provides an indexed access to redo data.
[Browsable(false)]
public virtual IUndoList RedoList { get; }
Property Value
Examples
Here is how to use a RedoList in the C# code:
using System;
using System.Windows;
using Alternet.Editor.Wpf;
public partial class MainWindow : Window
{
private TextSource textSource;
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var textEdit1 = new TextEditor();
textSource = new TextSource();
textSource.LoadFile("myfile.txt");
textEdit1.Source = this.textSource;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
foreach (UndoData undoData in textSource.RedoList)
{
Console.WriteLine(undoData.Operation);
}
}
}
Here is how to use a RedoList in the Visual Basic code:
Imports System
Imports System.Windows
Imports Alternet.Editor.Wpf
Partial Public Class MainWindow
Inherits Window
Private textSource As TextSource
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim textEdit1 = New TextEditor()
textSource = New TextSource()
textSource.LoadFile("myfile.txt")
textEdit1.Source = Me.textSource
End Sub
Private Sub Button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
For Each undoData As UndoData In textSource.RedoList
Console.WriteLine(undoData.Operation)
Next
End Sub
End Class
Remarks
TextSource can store an unlimited number of the undo\redo operations unless UndoLimit property specifies otherwise.
Any Undo operation performed within the text is automatically added to the RedoList so that it can be redone again.