New to Telerik UI for WinForms? Start a free 30-day trial

Represents a service that allows a DockWindow state to be saved and restored later on.

Definition

Constructors

Default constructor.

C#
public RedockService()

Properties

Determines whether clean-up is currently suspended.

C#
public bool IsCleanUpSuspended { get; }

Gets an array with all the states that are currently marked for clean-up.

C#
protected RedockState[] StatesForCleanup { get; }

Methods

Removes previous redock states which are no longer valid. For example, if we save a state for a dock window in a Docked state, we need to remove any previous redock state for the Docked state.

C#
public void CleanUp()

Removes all the redock states saved for the specified window.

C#
public void ClearAllStates(DockWindow window)
Parameters:windowDockWindow

The window whose saved states should be removed.

Removes previously saved redock state for the specified window for the specified DockState.

C#
public bool ClearState(DockWindow window, DockState dockState)
Parameters:windowDockWindow

The window whose saved state should be removed.

dockStateDockState

The docking state for which the saved state was recorded.

Returns:

bool

true if a saved state was removed; otherwise, false.

Retrieves the new DockState for a redock operation, depending on the provided current DockState.

C#
public static DockState GetNewDockState(DockState currState)
Parameters:currStateDockState

The window's current state.

Returns:

DockState

Docked for floating or auto-hide windows, Floating for docked or tabbed-document windows, and Docked for other states.

Gets a RedockState instance for the specified window and DockState.

C#
protected RedockState GetState(DockWindow window, DockState state, bool remove)
Parameters:windowDockWindow

The window for which to look-up a state.

stateDockState

The DockState to look-up for.

removebool

true to remove the state from the lookup after retrieving it.

Returns:

RedockState

The saved state, or null if the service cannot operate or no state is recorded.

Determines whether a Save operation is applicable for the specified window. Currently supported states are Docked, Floating, and AutoHide.

C#
public bool IsSaveApplicable(DockWindow window)
Parameters:windowDockWindow

The window whose current state is checked.

Returns:

bool

true when the window is docked, floating, or auto-hidden; otherwise, false.

Requests an explicit redock transaction for a single window.

C#
public void Redock(DockWindow window, bool defaultAction)
Parameters:windowDockWindow

The window to redock.

defaultActionbool

Whether to apply the default docking action when a saved state is missing or cannot be restored.

Performs a redock operation upon specified window.

C#
public void Redock(DockWindow window, RedockTransactionReason reason, bool defaultAction)
Parameters:windowDockWindow

The window to redock.

reasonRedockTransactionReason

The interaction or code path that initiated the redock.

defaultActionbool

true to apply the default docking action when no saved state is available or it cannot be restored; otherwise, false.

Performs a redock operation upon specified windows.

C#
public void Redock(IEnumerable<DockWindow> windows, bool defaultAction)
Parameters:windowsIEnumerable<DockWindow>

The windows to redock.

defaultActionbool

true to apply the default docking action when no saved state is available or it cannot be restored; otherwise, false.

Performs a redock operation upon specified windows.

C#
public void Redock(IEnumerable<DockWindow> windows, RedockTransactionReason reason, bool defaultAction)
Parameters:windowsIEnumerable<DockWindow>

The windows to redock.

reasonRedockTransactionReason

The interaction or code path that initiated the redock.

defaultActionbool

true to apply the default docking action when no saved state is available or it cannot be restored; otherwise, false.

Releases previous redock state. Current implementation simply notifies the referenced DockTabStrip that it is not a redock target anymore.

C#
protected void RemovePreviousState(RedockState oldState)
Parameters:oldStateRedockState

The state whose target strip should no longer be marked for redocking.

Attempts to restore the state the window to the desired dock state.

C#
public void RestoreState(DockWindow window, DockState state, bool defaultAction)
Parameters:windowDockWindow

The window whose saved state should be restored.

stateDockState

The target state which is to be restored.

defaultActionbool

true to apply the default docking action when no saved state is available or it cannot be restored; otherwise, false.

Attempts to restore the state of each window to the specified one.

C#
public void RestoreState(IEnumerable<DockWindow> windows, DockState state, bool defaultAction)
Parameters:windowsIEnumerable<DockWindow>

The windows whose saved states should be restored.

stateDockState

The target state which is to be restored.

defaultActionbool

true to apply the default docking action when no saved state is available or it cannot be restored; otherwise, false.

Resumes previously suspended clean-up.

C#
public void ResumeCleanUp(bool forceCleanUp)
Parameters:forceCleanUpbool

True to force a clean-up pass, false otherwise.

Saves the current state of the specified window.

C#
public virtual bool SaveState(DockWindow window)
Parameters:windowDockWindow

The window whose current docking position and state should be recorded.

Returns:

bool

true when a valid state was saved; otherwise, false.

Preforms the core Save logic.

C#
protected virtual bool SaveStateCore(DockWindow window)
Parameters:windowDockWindow

The window whose current state should be recorded.

Returns:

bool

true if the state was valid and saved; otherwise, false.

Temporary suspends any clean-up operations. Used by the owning RadDock instance to prevent undesired processing during multiple transactions stack.

C#
public void SuspendCleanUp()