Reports for WinForms | ComponentOne
C1.Win.C1Report.4 Assembly / C1.Win.C1Preview Namespace / C1PreviewPane Class / AddViewStateToHistory Method
The HistorySavedActionsEnum value defining user action associated with the new history item.
The caption of the new history item.
The ViewState structure representig the state of C1PreviewPane control (scroll position, zooming etc).

In This Topic
    AddViewStateToHistory Method
    In This Topic
    Creates a new ViewHistoryItem object with the specified ViewState.

    The newly created object is then added to the ViewHistory collection.

    Adding of the new state to history can be cancelled in the HistoryItemAdding event.

    Syntax
    'Declaration
     
    Public Function AddViewStateToHistory( _
       ByVal userAction As HistorySavedActionsEnum, _
       ByVal historyItemCaption As String, _
       ByVal viewState As ViewState _
    ) As ViewHistoryItem
    public ViewHistoryItem AddViewStateToHistory( 
       HistorySavedActionsEnum userAction,
       string historyItemCaption,
       ViewState viewState
    )

    Parameters

    userAction
    The HistorySavedActionsEnum value defining user action associated with the new history item.
    historyItemCaption
    The caption of the new history item.
    viewState
    The ViewState structure representig the state of C1PreviewPane control (scroll position, zooming etc).

    Return Value

    The newly created ViewHistoryItem object, or null if the action was cancelled.
    See Also