Add Show Details functionality to context menu (so we can remove the IsVisible on ContextMenu)
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
<Grid>
<Grid.ContextMenu>
<!-- If you want to add more items to the context menu and you want the Send tab to show it too, then place IsVisible="{Binding InCoinJoinContainer}" directly to the Dequeue MenuItem. -->
- <ContextMenu IsVisible="{Binding InCoinJoinContainer}">
- <MenuItem Header="Dequeue from CoinJoin" Command="{Binding DequeueCoin}">
+ <ContextMenu>
+ <MenuItem Header="{Binding ExpandMenuCaption}" Command="{Binding ToggleDetails}">
+ <MenuItem.Icon>
+ <DrawingPresenter HorizontalAlignment="Left" Height="16" Width="16" Stretch="Fill" Drawing="{StaticResource CoinListView_More}" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem IsVisible="{Binding InCoinJoinContainer}" Header="Dequeue from CoinJoin" Command="{Binding DequeueCoin}">
<MenuItem.Icon>
<DrawingPresenter HorizontalAlignment="Left" Height="16" Width="16" Stretch="Fill" Drawing="{StaticResource CoinListView_DequeueCoin}" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</Grid.ContextMenu>
- <Expander Name="coinExpander" ExpandDirection="Down" Classes="coloredExpander" Background="{Binding ElementName=coinExpander, Path=IsExpanded, Converter={StaticResource CoinItemExpanderColorConverter}}">
+ <Expander Name="coinExpander" IsExpanded="{Binding IsExpanded}" ExpandDirection="Down" Classes="coloredExpander" Background="{Binding ElementName=coinExpander, Path=IsExpanded, Converter={StaticResource CoinItemExpanderColorConverter}}">
<Grid HorizontalAlignment="Left" ColumnDefinitions="150, *" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto" MaxWidth="800" Margin="35 10 0 25">
<TextBlock Classes="monospaceFont" Text="Transaction Id:" Grid.Row="0" />
<controls:ExtendedTextBox Classes="selectableTextBlock monospaceFont Transparent" Text="{Binding TransactionId}" Background="Transparent" Grid.Column="1" Grid.Row="0" />

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
@@ -9,6 +9,7 @@ using System.Reactive.Linq;
using WalletWasabi.Blockchain.TransactionOutputs;
using WalletWasabi.CoinJoin.Client.Rounds;
using WalletWasabi.CoinJoin.Common.Models;
+using WalletWasabi.Gui.Helpers;
using WalletWasabi.Gui.Models;
using WalletWasabi.Gui.ViewModels;
using WalletWasabi.Models;
@@ -25,6 +26,9 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private ObservableAsPropertyHelper<bool> _unspent;
private ObservableAsPropertyHelper<bool> _confirmed;
private ObservableAsPropertyHelper<bool> _unavailable;
+ private ObservableAsPropertyHelper<string> _expandMenuCaption;
+ private bool _isExpanded;
+ public ReactiveCommand<Unit, bool> ToggleDetails { get; }
public CoinListViewModel Owner { get; }
public Global Global { get; set; }
@@ -93,6 +97,23 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
DequeueCoin = ReactiveCommand.Create(() => Owner.PressDequeue(Model), this.WhenAnyValue(x => x.CoinJoinInProgress));
+ _expandMenuCaption = this
+ .WhenAnyValue(x => x.IsExpanded)
+ .Select(x => (x ? "Hide " : "Show ") + "Details")
+ .ObserveOn(RxApp.MainThreadScheduler)
+ .ToProperty(this, x => x.ExpandMenuCaption)
+ .DisposeWith(Disposables);
+
+ ToggleDetails = ReactiveCommand.Create(() => IsExpanded = !IsExpanded);
+
+ ToggleDetails.ThrownExceptions
+ .ObserveOn(RxApp.TaskpoolScheduler)
+ .Subscribe(ex =>
+ {
+ NotificationHelpers.Error(ex.ToTypeMessageString());
+ Logging.Logger.LogWarning(ex);
+ });
+
DequeueCoin.ThrownExceptions
.ObserveOn(RxApp.TaskpoolScheduler)
.Subscribe(ex => Logging.Logger.LogError(ex)); // Don't notify about it. Dequeue failure (and success) is notified by other mechanism.
@@ -110,6 +131,12 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public string Address => Model.ScriptPubKey.GetDestinationAddress(Global.Network).ToString();
+ public bool IsExpanded
+ {
+ get => _isExpanded;
+ set => this.RaiseAndSetIfChanged(ref _isExpanded, value);
+ }
+
public int Confirmations => Model.Height.Type == HeightType.Chain
? (int)Global.BitcoinStore.SmartHeaderChain.TipHeight - Model.Height.Value + 1
: 0;
@@ -163,6 +190,8 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
set => this.RaiseAndSetIfChanged(ref _status, value);
}
+ public string ExpandMenuCaption => _expandMenuCaption?.Value ?? string.Empty;
+
private void RefreshSmartCoinStatus()
{
Status = GetSmartCoinStatus();

MODIFY
WalletWasabi.Gui/Icons/Icons.xaml
WalletWasabi.Gui/Icons/Icons.xaml
<DrawingGroup x:Key="ConfirmationIcon">
<GeometryDrawing Brush="#22B14C" Geometry="F1 M 23.7501,33.25L 34.8334,44.3333L 52.2499,22.1668L 56.9999,26.9168L 34.8334,53.8333L 19.0001,38L 23.7501,33.25 Z" />
</DrawingGroup>
+ <DrawingGroup x:Key="CoinListView_More">
+ <DrawingGroup.Children>
+ <GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
+ <GeometryDrawing Brush="#00FFFFFF" Geometry="F1M0,14L16,14 16,1.999 0,1.999z" />
+ <GeometryDrawing Brush="#22B14C" Geometry="F1M15,11L9,11 9,13 15,13z M7,11L1,11 1,13 7,13z M15,7L9,7 9,9 15,9z M7,7L1,7 1,9 7,9z M15,3L9,3 9,5 15,5z M7,5L1,5 1,3 7,3z" />
+ </DrawingGroup.Children>
+ </DrawingGroup>
<!-- ReceiveTabView icons -->
<DrawingGroup x:Key="ReceiveTabView_ToggleQrCode">
<GeometryDrawing Brush="#22B14C" Geometry="M16.803,18.615h-4.535c-1,0-1.814-0.812-1.814-1.812v-4.535c0-1.002,0.814-1.814,1.814-1.814h4.535c1.001,0,1.813,0.812,1.813,1.814v4.535C18.616,17.803,17.804,18.615,16.803,18.615zM17.71,12.268c0-0.502-0.405-0.906-0.907-0.906h-4.535c-0.501,0-0.906,0.404-0.906,0.906v4.535c0,0.502,0.405,0.906,0.906,0.906h4.535c0.502,0,0.907-0.404,0.907-0.906V12.268z M16.803,9.546h-4.535c-1,0-1.814-0.812-1.814-1.814V3.198c0-1.002,0.814-1.814,1.814-1.814h4.535c1.001,0,1.813,0.812,1.813,1.814v4.534C18.616,8.734,17.804,9.546,16.803,9.546zM17.71,3.198c0-0.501-0.405-0.907-0.907-0.907h-4.535c-0.501,0-0.906,0.406-0.906,0.907v4.534c0,0.501,0.405,0.908,0.906,0.908h4.535c0.502,0,0.907-0.406,0.907-0.908V3.198z M7.733,18.615H3.198c-1.002,0-1.814-0.812-1.814-1.812v-4.535c0-1.002,0.812-1.814,1.814-1.814h4.535c1.002,0,1.814,0.812,1.814,1.814v4.535C9.547,17.803,8.735,18.615,7.733,18.615zM8.64,12.268c0-0.502-0.406-0.906-0.907-0.906H3.198c-0.501,0-0.907,0.404-0.907,0.906v4.535c0,0.502,0.406,0.906,0.907,0.906h4.535c0.501,0,0.907-0.404,0.907-0.906V12.268z M7.733,9.546H3.198c-1.002,0-1.814-0.812-1.814-1.814V3.198c0-1.002,0.812-1.814,1.814-1.814h4.535c1.002,0,1.814,0.812,1.814,1.814v4.534C9.547,8.734,8.735,9.546,7.733,9.546z M8.64,3.198c0-0.501-0.406-0.907-0.907-0.907H3.198c-0.501,0-0.907,0.406-0.907,0.907v4.534c0,0.501,0.406,0.908,0.907,0.908h4.535c0.501,0,0.907-0.406,0.907-0.908V3.198z" />

Add Show Details functionality to context menu (so we can remove the IsVisible on ContextMenu)