Enable double-click behavior
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/AdvancedDetailTab.xaml
WalletWasabi.Gui/Controls/WalletExplorer/AdvancedDetailTab.xaml
</Style>
</UserControl.Styles>
<Grid>
- <StackPanel>
- <StackPanel.ItemTemplate>
+ <!-- <StackPanel>
+ <ContentControl.ItemTemplate>
<DataTemplate>
<Grid>
</Grid>
</DataTemplate>
</StackPanel.ItemTemplate>
- </StackPanel>
+ </StackPanel> -->
</Grid>
</UserControl>

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/AdvancedDetailTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/AdvancedDetailTabViewModel.cs
-using Avalonia.Controls;
-using Avalonia.Threading;
-using DynamicData;
-using DynamicData.Binding;
-using NBitcoin;
-using ReactiveUI;
using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
-using System.Linq;
-using System.Reactive;
using System.Reactive.Disposables;
-using System.Reactive.Linq;
-using System.Threading.Tasks;
-using WalletWasabi.Gui.Models;
-using WalletWasabi.Gui.ViewModels;
-using WalletWasabi.Logging;
-using WalletWasabi.Blockchain.TransactionOutputs;
-using WalletWasabi.Blockchain.TransactionProcessing;
using Splat;
+using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Gui.Controls.WalletExplorer
{
- public class AdvancedDetailTabViewModel : ViewModelBase
+ public class AdvancedDetailTabViewModel<TViewModel> : WasabiDocumentTabViewModel
+ where TViewModel : ViewModelBase
{
private CompositeDisposable Disposables { get; set; }
private Global Global { get; }
- private ViewModelBase TargetVM { get; }
+ private TViewModel TargetVM { get; }
+
+ public static AdvancedDetailTabViewModel<T> GenerateAdvancedDetailTab<T>(T targetVM) where T : ViewModelBase
+ {
+ return null;
+ }
- public AdvancedDetailTabViewModel(ViewModelBase targetVM)
+ public AdvancedDetailTabViewModel(string Title, TViewModel targetVM) : base(Title)
{
Global = Locator.Current.GetService<Global>();
TargetVM = targetVM;
}
- private void OnOpen()
+ public override void OnOpen()
{
Disposables = Disposables is null ?
new CompositeDisposable() :
throw new NotSupportedException($"Cannot open {GetType().Name} before closing it.");
}
- public void OnClose()
+ public override bool OnClose()
{
// Do not dispose the RootList here. It will be reused next time when you open CoinJoinTab or SendTab.
Disposables?.Dispose();
Disposables = null;
+ return true;
}
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
<controls:ExtendedListBox.ItemTemplate>
<DataTemplate>
<Grid Classes="CoinItemGrid">
+ <i:Interaction.Behaviors>
+ <behaviors:CommandOnDoubleClickBehavior Command="{Binding OpenAdvancedDetail}" />
+ </i:Interaction.Behaviors>
<Grid.ContextMenu>
<ContextMenu>
<MenuItem IsVisible="{Binding CanBeDequeued}" Header="Dequeue from CoinJoin" Command="{Binding DequeueCoin}">

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
@@ -15,6 +15,8 @@ using WalletWasabi.Gui.Models;
using WalletWasabi.Gui.ViewModels;
using WalletWasabi.Models;
using WalletWasabi.Logging;
+using AvalonStudio.Extensibility;
+using AvalonStudio.Shell;
namespace WalletWasabi.Gui.Controls.WalletExplorer
{
@@ -32,6 +34,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private ObservableAsPropertyHelper<string> _expandMenuCaption;
private bool _isExpanded;
public ReactiveCommand<Unit, bool> ToggleDetails { get; }
+ public ReactiveCommand<Unit, Unit> OpenAdvancedDetail { get; }
public CoinListViewModel Owner { get; }
private Global Global { get; }
@@ -114,6 +117,12 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
ToggleDetails = ReactiveCommand.Create(() => IsExpanded = !IsExpanded);
+ OpenAdvancedDetail = ReactiveCommand.Create(() =>
+ {
+ var advancedDetail = AdvancedDetailTabViewModel.GenerateAdvancedDetailTab(this);
+ IoC.Get<IShell>().AddOrSelectDocument(advancedDetail);
+ });
+
ToggleDetails.ThrownExceptions
.ObserveOn(RxApp.TaskpoolScheduler)
.Subscribe(ex =>

Enable double-click behavior