[]
        
(Showing Draft Content)

C1.Win.C1Preview.C1PreviewPane.AddCurrentViewStateToHistory

AddCurrentViewStateToHistory Method

AddCurrentViewStateToHistory(HistorySavedActionsEnum, string, bool)

Creates a new ViewHistoryItem object using the current state of the C1PreviewPane.

The newly created object is then added to the ViewHistory collection. Adding of the new state to history is cancelled if the Document property of the current preview pane is null, or if the specified action should not be saved according to the SavedActions value of the current pane's HistoryOptions.

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

Declaration
public ViewHistoryItem AddCurrentViewStateToHistory(HistorySavedActionsEnum userAction, string historyItemCaption, bool force)
Parameters
Type Name Description
HistorySavedActionsEnum userAction

A HistorySavedActionsEnum value defining the user action associated with the new history item.

string historyItemCaption

The caption of the new history item.

bool force

If true, forces adding of the current state even if it is equal to the state stored in the CurrentHistoryEntry.

Returns
Type Description
ViewHistoryItem

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