Skip to content

Commit

Permalink
Added documentation to IsFloating property in LayoutContent.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirkster99 committed Aug 14, 2020
1 parent b2a39c9 commit 0621798
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions source/Components/AvalonDock/Layout/LayoutContent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/************************************************************************
/************************************************************************
AvalonDock
Copyright (C) 2007-2013 Xceed Software Inc.
Expand Down Expand Up @@ -404,6 +404,8 @@ public object ToolTip

#endregion ToolTip

/// <summary>Gets whether the content is currently floating or not.</summary>
[Bindable(true), Description("Gets whether the content is currently floating or not."), Category("Other")]
public bool IsFloating => this.FindParent<LayoutFloatingWindow>() != null;

#region IconSource
Expand Down Expand Up @@ -484,15 +486,14 @@ public bool IsEnabled

#region Public Methods

/// <summary>
/// Close the content
/// </summary>
/// <remarks>Please note that usually the anchorable is only hidden (not closed). By default when user click the X button it only hides the content.</remarks>
/// <summary>Close the content</summary>
/// <remarks>Note that the anchorable is only hidden (not closed). By default when user click the X button it only hides the content.</remarks>
public abstract void Close();

/// <inheritdoc />
public System.Xml.Schema.XmlSchema GetSchema() => null;

/// <inheritdoc />
public virtual void ReadXml(System.Xml.XmlReader reader)
{
if (reader.MoveToAttribute(nameof(Title)))
Expand Down Expand Up @@ -531,6 +532,7 @@ public virtual void ReadXml(System.Xml.XmlReader reader)
reader.Read();
}

/// <inheritdoc />
public virtual void WriteXml(System.Xml.XmlWriter writer)
{
if (!string.IsNullOrWhiteSpace(Title))
Expand Down Expand Up @@ -576,9 +578,7 @@ public int CompareTo(LayoutContent other)
return string.Compare(Title, other.Title);
}

/// <summary>
/// Float the content in a popup window
/// </summary>
/// <summary>Float the content in a popup window</summary>
public void Float()
{
if (PreviousContainer != null && PreviousContainer.FindParent<LayoutFloatingWindow>() != null)
Expand Down Expand Up @@ -639,9 +639,7 @@ public void DockAsDocument()
RaisePropertyChanged(nameof(IsFloating));
}

/// <summary>
/// Re-dock the content to its previous container
/// </summary>
/// <summary>Re-dock the content to its previous container</summary>
public void Dock()
{
if (PreviousContainer != null)
Expand Down Expand Up @@ -678,19 +676,19 @@ public void Dock()
RaisePropertyChanged(nameof(IsFloating));
}

#endregion Public Methods
#endregion Public Methods

#region Overrides
#region Overrides

protected override void OnParentChanging(ILayoutContainer oldValue, ILayoutContainer newValue)
/// <inheritdoc />
protected override void OnParentChanging(ILayoutContainer oldValue, ILayoutContainer newValue)
{
if (oldValue != null) IsSelected = false;
//var root = Root;
//if (root != null && _isActive && newValue == null)
// root.ActiveContent = null;

base.OnParentChanging(oldValue, newValue);
}

/// <inheritdoc />
protected override void OnParentChanged(ILayoutContainer oldValue, ILayoutContainer newValue)
{
if (IsSelected && Parent is ILayoutContentSelector)
Expand All @@ -699,10 +697,6 @@ protected override void OnParentChanged(ILayoutContainer oldValue, ILayoutContai
parentSelector.SelectedContentIndex = parentSelector.IndexOf(this);
}

//var root = Root;
//if (root != null && _isActive)
// root.ActiveContent = this;

base.OnParentChanged(oldValue, newValue);
}

Expand Down

0 comments on commit 0621798

Please sign in to comment.