Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ internal class AutoHideWindowManager
private DockingManager _manager;
private WeakReference _currentAutohiddenAnchor = null;
private DispatcherTimer _closeTimer = null;
private int _fastTimer = 0;

#endregion

Expand Down Expand Up @@ -68,20 +69,31 @@ public void HideAutoWindow( LayoutAnchorControl anchor = null )
private void SetupCloseTimer()
{
_closeTimer = new DispatcherTimer( DispatcherPriority.Background );
_closeTimer.Interval = TimeSpan.FromMilliseconds( 1500 );
_closeTimer.Interval = TimeSpan.FromMilliseconds( 100 );
_closeTimer.Tick += ( s, e ) =>
{
if( _manager.AutoHideWindow.IsWin32MouseOver ||
( ( LayoutAnchorable )_manager.AutoHideWindow.Model ).IsActive ||
_manager.AutoHideWindow.IsResizing )
{
if (_fastTimer == 0) {
_closeTimer.Interval = TimeSpan.FromMilliseconds( 1500 );
_fastTimer = -1;
}
else if (_fastTimer > 0)
{
--_fastTimer;
}
return;
}

StopCloseTimer();
};
}

private void StartCloseTimer()
{
_fastTimer = 5;
_closeTimer.Start();
}

Expand Down