这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion source/Components/AvalonDock/Controls/LayoutAnchorControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ protected override void OnMouseEnter(System.Windows.Input.MouseEventArgs e)
{
base.OnMouseEnter(e);

if (!e.Handled)
// If the model wants to auto-show itself on hover then initiate the show action
if (!e.Handled && _model.CanShowOnHover)
{
_openUpTimer = new DispatcherTimer(DispatcherPriority.ApplicationIdle);
_openUpTimer.Interval = TimeSpan.FromMilliseconds(400);
Expand Down
28 changes: 28 additions & 0 deletions source/Components/AvalonDock/Layout/LayoutContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,30 @@ public bool CanFloat

#endregion CanFloat

#region CanShowOnHover

private bool _canShowOnHover = true;

/// <summary>
/// Set to false to disable the behavior of auto-showing
/// a <see cref="LayoutAnchorableControl"/> on mouse over.
/// When true, hovering the mouse over an anchorable tab
/// will cause the anchorable to show itself.
/// </summary>
/// <remarks>Defaults to true</remarks>
public bool CanShowOnHover
{
get => _canShowOnHover;
set
{
if (value == _canShowOnHover) return;
_canShowOnHover = value;
RaisePropertyChanged(nameof(CanShowOnHover));
}
}

#endregion CanShowOnHover

#region IsEnabled

private bool _isEnabled = true;
Expand Down Expand Up @@ -531,6 +555,8 @@ public virtual void ReadXml(System.Xml.XmlReader reader)
CanFloat = bool.Parse(reader.Value);
if (reader.MoveToAttribute(nameof(LastActivationTimeStamp)))
LastActivationTimeStamp = DateTime.Parse(reader.Value, CultureInfo.InvariantCulture);
if (reader.MoveToAttribute(nameof(CanShowOnHover)))
CanShowOnHover = bool.Parse(reader.Value);

reader.Read();
}
Expand Down Expand Up @@ -570,6 +596,8 @@ public virtual void WriteXml(System.Xml.XmlWriter writer)

if (LastActivationTimeStamp != null) writer.WriteAttributeString(nameof(LastActivationTimeStamp), LastActivationTimeStamp.Value.ToString(CultureInfo.InvariantCulture));

if (!CanShowOnHover) writer.WriteAttributeString(nameof(CanShowOnHover), CanShowOnHover.ToString());

if (_previousContainer is ILayoutPaneSerializable paneSerializable)
{
writer.WriteAttributeString("PreviousContainerId", paneSerializable.Id);
Expand Down