private void MakeHidden()
{
// Check to see if we allowed to perform operations
if (!Disposing && !IsDisposed)
{
if (_state != DockingAutoHiddenShowState.Hidden)
{
// Set state so timer processing does not perform any slide action
_state = DockingAutoHiddenShowState.Hidden;
AutoHiddenShowingStateEventArgs args = new AutoHiddenShowingStateEventArgs(_page, _state);
// Remove cached references
_page = null;
_group = null;
// No need for timers to be running or for our display
_slideTimer.Stop();
_dismissTimer.Stop();
_dismissRunning = false;
Visible = false;
// Move to correct z-order position
ResetChildIndex();
// If the dockspace has the focus we need to push focus elsewhere
if (DockspaceControl.ContainsFocus)
{
DockspaceControl.CellLosesFocus -= new EventHandler<WorkspaceCellEventArgs>(OnDockspaceCellLosesFocus);
_dummyTarget.Select();
}
// Remove all the pages so that the pages have palette redirection reset
DockspaceControl.ClearAllPages();
// Raises event to indicate change in auto hidden showing state
OnAutoHiddenShowingStateChanged(args);
}
}
}