WPF

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class HistoryManager - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class HistoryManager

    Represents to customizes the undo redo functionalities.

    Inheritance
    System.Object
    HistoryManager
    Implements
    IUndoRedo
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.UI.Xaml.Diagram
    Assembly: Syncfusion.SfDiagram.WPF.dll
    Syntax
    public class HistoryManager : IUndoRedo, INotifyPropertyChanged

    Constructors

    HistoryManager()

    Declaration
    public HistoryManager()

    Properties

    RedoStack

    Gets the list of undo history entries.

    Declaration
    public Stack<HistoryEntry> RedoStack { get; }
    Property Value
    Type Description
    System.Collections.Generic.Stack<HistoryEntry>

    The list of data that is used when performing Undo Operations. The default value is an empty list.

    Remarks

    This property is used to add, remove, and modify the data in the undo list of the diagram's HistoryManager.

    StackLimit

    Gets or sets the numerical value that is used to limit the maximum number of history entries in the Undo and Redo stacks.

    Declaration
    public int StackLimit { get; set; }
    Property Value
    Type Description
    System.Int32

    This value represents the maximum number of history entries that can be stored in the undo and redo stack. The default value is 0, which means you can store an unlimited number of entries.

    State

    Gets or sets state for UndoRedo.

    Declaration
    public UndoRedoState State { get; set; }
    Property Value
    Type Description
    UndoRedoState

    UndoStack

    Gets the list of undo history entries.

    Declaration
    public Stack<HistoryEntry> UndoStack { get; }
    Property Value
    Type Description
    System.Collections.Generic.Stack<HistoryEntry>

    The list of data that is used when performing Undo Operations. The default value is an empty list.

    Remarks

    This property is used to add, remove, and modify the data in the undo list of the diagram's HistoryManager.

    Methods

    BeginComposite()

    Starts grouping the actions that will be undone/restored as a whole.

    Declaration
    public void BeginComposite()

    BeginComposite(IUndoRedo, Object)

    Starts grouping the actions that will be undone/restored as a whole.

    Declaration
    public void BeginComposite(IUndoRedo source, object data)
    Parameters
    Type Name Description
    IUndoRedo source

    The instance of source.

    System.Object data

    Specified the data(Instance of CompositeTransactions with the TransactionState as start) to log in the Stack.

    CanLogData(IUndoRedo, Object)

    canLog in the history list, which takes a history entry as argument and returns whether the specific entry can be added or not.

    Declaration
    public virtual bool CanLogData(IUndoRedo source, object data)
    Parameters
    Type Name Description
    IUndoRedo source

    The instance of IUndoRedo.

    System.Object data

    Specified the data to log in the Stack.

    Returns
    Type Description
    System.Boolean

    CanRedo(Object)

    Specifies a method to perform redo operation.

    Declaration
    public bool CanRedo(object data)
    Parameters
    Type Name Description
    System.Object data
    Returns
    Type Description
    System.Boolean

    Returns true, when the state as idle in redo operation. Otherwise, false.

    CanUndo(Object)

    Specifies a method to perform undo operation.

    Declaration
    public bool CanUndo(object data)
    Parameters
    Type Name Description
    System.Object data
    Returns
    Type Description
    System.Boolean

    Returns true, when the state as idle in undo operation. Otherwise, false.

    EndComposite()

    Closes grouping the actions that will be undone/restored as a whole

    Declaration
    public void EndComposite()

    EndComposite(IUndoRedo, Object)

    Closes grouping the actions that will be undone/restored as a whole

    Declaration
    public void EndComposite(IUndoRedo source, object data)
    Parameters
    Type Name Description
    IUndoRedo source

    The instance of source.

    System.Object data

    Specified the data(Instance of CompositeTransactions with the TransactionState as end) to log in the Stack.

    LogData(IUndoRedo, Object)

    Specifies a method to log the requied data with instance of source to stack for UndoRedo.

    Declaration
    public bool LogData(IUndoRedo source, object data)
    Parameters
    Type Name Description
    IUndoRedo source

    The instance of IUndoRedo.

    System.Object data

    Specified the data to log in the Stack.

    Returns
    Type Description
    System.Boolean

    OnPropertyChanged(String)

    Declaration
    protected virtual void OnPropertyChanged(string name)
    Parameters
    Type Name Description
    System.String name

    Redo(Object)

    Specifies a method to invoke when perform redo operation.

    Declaration
    public object Redo(object data)
    Parameters
    Type Name Description
    System.Object data
    Returns
    Type Description
    System.Object

    Undo(Object)

    Specifies a method to invoke when perform undo operation.

    Declaration
    public object Undo(object data)
    Parameters
    Type Name Description
    System.Object data
    Returns
    Type Description
    System.Object

    Events

    PropertyChanged

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type Description
    System.ComponentModel.PropertyChangedEventHandler

    Implements

    IUndoRedo
    System.ComponentModel.INotifyPropertyChanged
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved