Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding HideOnClose for anchorables

  • Loading branch information...
commit 5594e01e187f90a4bde9a7d4b8afe2e2712cafce 1 parent 576e24b
@VirusFree authored
View
21 AvalonDock/Layout/LayoutAnchorable.cs
@@ -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");
View
2  AvalonDock/Properties/Resources.Designer.cs
@@ -79,7 +79,7 @@ public class Resources {
}
/// <summary>
- /// Looks up a localized string similar to Hide.
+ /// Looks up a localized string similar to Close.
/// </summary>
public static string Anchorable_BtnClose_Hint {
get {
View
2  AvalonDock/Properties/Resources.resx
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.