Skip to content

Commit

Permalink
Merge pull request #110 from Jiiks/master
Browse files Browse the repository at this point in the history
Make autohide delay a configurable property
  • Loading branch information
Dirkster99 committed Feb 6, 2020
2 parents ef9a672 + bdc85b0 commit f25a92a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void HideAutoWindow(LayoutAnchorControl anchor = null)
private void SetupCloseTimer()
{
_closeTimer = new DispatcherTimer(DispatcherPriority.Background);
_closeTimer.Interval = TimeSpan.FromMilliseconds(1500);
_closeTimer.Interval = TimeSpan.FromMilliseconds(_manager.AutoHideDelay);
_closeTimer.Tick += (s, e) =>
{
if (_manager.AutoHideWindow.IsWin32MouseOver ||
Expand Down
16 changes: 16 additions & 0 deletions source/Components/AvalonDock/DockingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,22 @@ public DockingManager()

#region Public Properties

// Make autohide delay a configurable property
public static readonly DependencyProperty AutoHideDelayProperty = DependencyProperty.Register("AutoHideDelay", typeof(int), typeof(DockingManager),
new FrameworkPropertyMetadata(1500));

public int AutoHideDelay
{
get
{
return (int)GetValue(AutoHideDelayProperty);
}
set
{
SetValue(AutoHideDelayProperty, value);
}
}

#region Layout

/// <summary>
Expand Down

0 comments on commit f25a92a

Please sign in to comment.