Permalink
Browse files

adding HideOnClose for anchorables

  • Loading branch information...
VirusFree committed Mar 28, 2013
1 parent 576e24b commit 5594e01e187f90a4bde9a7d4b8afe2e2712cafce
@@ -29,6 +29,17 @@ namespace AvalonDock.Layout
[Serializable]
public class LayoutAnchorable : LayoutContent
{
+ #region HideOnClose
+
+ private bool _HideOnClose = false;
+ public bool HideOnClose
+ {
+ get { return _HideOnClose; }
+ set { _HideOnClose = value; }
+ }
+
+ #endregion
+
#region IsVisible
[XmlIgnore]
public bool IsVisible
@@ -187,6 +198,16 @@ public void Hide(bool cancelable = true)
OnHiding(args);
if (args.Cancel)
return;
+ if (this.IsFloating)
+ {
+ var c = new CancelEventArgs();
+ OnClosing(c);
+ if (c.Cancel == false)
+ {
+ Close();
+ return;
+ }
+ }
}
RaisePropertyChanging("IsHidden");

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -124,7 +124,7 @@
<value>Auto Hide</value>
</data>
<data name="Anchorable_BtnClose_Hint" xml:space="preserve">
- <value>Hide</value>
+ <value>Close</value>
</data>
<data name="Anchorable_CxMenu_Hint" xml:space="preserve">
<value>Window Position</value>

0 comments on commit 5594e01

Please sign in to comment.