Add closed property to tab
MODIFY
WalletWasabi.Gui/ViewModels/WasabiDocumentTabViewModel.cs
WalletWasabi.Gui/ViewModels/WasabiDocumentTabViewModel.cs
@@ -4,6 +4,7 @@ using AvalonStudio.Shell;
using Dock.Model;
using ReactiveUI;
using System;
+using System.Threading.Tasks;
namespace WalletWasabi.Gui.ViewModels
{
@@ -25,6 +26,7 @@ namespace WalletWasabi.Gui.ViewModels
public double Height { get; set; }
public IView Parent { get; set; }
private bool _isSelected;
+ private bool _isClosed;
public bool IsSelected
{
@@ -32,6 +34,12 @@ namespace WalletWasabi.Gui.ViewModels
set => this.RaiseAndSetIfChanged(ref _isSelected, value);
}
+ public bool IsClosed
+ {
+ get => _isClosed;
+ set => this.RaiseAndSetIfChanged(ref _isClosed, value);
+ }
+
public bool IsDirty { get; set; }
public virtual void OnSelected()
@@ -46,13 +54,14 @@ namespace WalletWasabi.Gui.ViewModels
public virtual void OnOpen()
{
+ IsClosed = false;
}
public virtual bool OnClose()
{
IsSelected = false;
IoC.Get<IShell>().RemoveDocument(this);
-
+ IsClosed = true;
return true;
}
}

Add closed property to tab