RedockService
Represents a service that allows a DockWindow state to be saved and restored later on.
Definition
Namespace:Telerik.WinControls.UI.Docking
Assembly:Telerik.WinControls.RadDock.dll
Syntax:
public class RedockService : RadDockService, IDisposable, INotifyPropertyChanged, INotifyPropertyChangingEx
Inheritance: objectRadDockObjectRadDockServiceRedockService
Implements:
Inherited Members
Constructors
Default constructor.
public RedockService()
Properties
Determines whether clean-up is currently suspended.
public bool IsCleanUpSuspended { get; }
Gets an array with all the states that are currently marked for clean-up.
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.
public void CleanUp()
Removes all the redock states saved for the specified window.
public void ClearAllStates(DockWindow window)
The window whose saved states should be removed.
Removes previously saved redock state for the specified window for the specified DockState.
public bool ClearState(DockWindow window, DockState dockState)
The window whose saved state should be removed.
dockStateDockStateThe docking state for which the saved state was recorded.
Returns:Retrieves the new DockState for a redock operation, depending on the provided current DockState.
Gets a RedockState instance for the specified window and DockState.
protected RedockState GetState(DockWindow window, DockState state, bool remove)
The window for which to look-up a state.
stateDockStateThe DockState to look-up for.
removebooltrue to remove the state from the lookup after retrieving it.
Returns: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.
public bool IsSaveApplicable(DockWindow window)
The window whose current state is checked.
Returns:true when the window is docked, floating, or auto-hidden; otherwise, false.
Requests an explicit redock transaction for a single window.
public void Redock(DockWindow window, bool defaultAction)
The window to redock.
defaultActionboolWhether to apply the default docking action when a saved state is missing or cannot be restored.
Performs a redock operation upon specified window.
public void Redock(DockWindow window, RedockTransactionReason reason, bool defaultAction)
The window to redock.
reasonRedockTransactionReasonThe interaction or code path that initiated the redock.
defaultActionbooltrue 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.
public void Redock(IEnumerable<DockWindow> windows, bool defaultAction)
The windows to redock.
defaultActionbooltrue 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.
public void Redock(IEnumerable<DockWindow> windows, RedockTransactionReason reason, bool defaultAction)
The windows to redock.
reasonRedockTransactionReasonThe interaction or code path that initiated the redock.
defaultActionbooltrue 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.
protected void RemovePreviousState(RedockState oldState)
The state whose target strip should no longer be marked for redocking.
Attempts to restore the state the window to the desired dock state.
public void RestoreState(DockWindow window, DockState state, bool defaultAction)
The window whose saved state should be restored.
stateDockStateThe target state which is to be restored.
defaultActionbooltrue 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.
public void RestoreState(IEnumerable<DockWindow> windows, DockState state, bool defaultAction)
The windows whose saved states should be restored.
stateDockStateThe target state which is to be restored.
defaultActionbooltrue to apply the default docking action when no saved state is available or it cannot be restored; otherwise, false.
Resumes previously suspended clean-up.
public void ResumeCleanUp(bool forceCleanUp)
True to force a clean-up pass, false otherwise.
Saves the current state of the specified window.
public virtual bool SaveState(DockWindow window)
The window whose current docking position and state should be recorded.
Returns:Preforms the core Save logic.
protected virtual bool SaveStateCore(DockWindow window)
The window whose current state should be recorded.
Returns:Temporary suspends any clean-up operations. Used by the owning RadDock instance to prevent undesired processing during multiple transactions stack.
public void SuspendCleanUp()