Add double tapped support for WalletCoinsView
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Advanced/WalletCoins/WalletCoinViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Advanced/WalletCoins/WalletCoinViewModel.cs
@@ -3,6 +3,7 @@ using ReactiveUI;
using System.Collections.Generic;
using System.Reactive.Disposables;
using System.Reactive.Linq;
+using System.Windows.Input;
using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.TransactionOutputs;
using WalletWasabi.Fluent.Helpers;
@@ -27,6 +28,8 @@ public partial class WalletCoinViewModel : ViewModelBase, IDisposable
Coin = coin;
Amount = Coin.Amount;
+ ToggleSelectCommand = ReactiveCommand.Create(() => IsSelected = !IsSelected);
+
Coin.WhenAnyValue(c => c.Confirmed).Subscribe(x => Confirmed = x).DisposeWith(_disposables);
Coin.WhenAnyValue(c => c.HdPubKey.Cluster.Labels).Subscribe(x => SmartLabel = x).DisposeWith(_disposables);
Coin.WhenAnyValue(c => c.HdPubKey.AnonymitySet).Subscribe(x => AnonymitySet = (int)x).DisposeWith(_disposables);
@@ -36,6 +39,8 @@ public partial class WalletCoinViewModel : ViewModelBase, IDisposable
Coin.WhenAnyValue(c => c.Height).Select(_ => Coin.GetConfirmations()).Subscribe(x => ConfirmedToolTip = $"{x} confirmation{TextHelpers.AddSIfPlural(x)}").DisposeWith(_disposables);
}
+ public ICommand ToggleSelectCommand { get; }
+
public SmartCoin Coin { get; }
public static Comparison<WalletCoinViewModel?> SortAscending<T>(Func<WalletCoinViewModel, T> selector)

MODIFY
WalletWasabi.Fluent/Views/Wallets/Advanced/WalletCoins/WalletCoinsView.axaml
WalletWasabi.Fluent/Views/Wallets/Advanced/WalletCoins/WalletCoinsView.axaml
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
xmlns:c="using:WalletWasabi.Fluent.Controls"
+ xmlns:behaviors="clr-namespace:WalletWasabi.Fluent.Behaviors"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
xmlns:walletcoins="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Advanced.WalletCoins"
x:DataType="walletcoins:WalletCoinsViewModel"
<Style Selector="TreeDataGridRow">
<Setter Property="Focusable" Value="False" />
<Setter Property="Height" Value="47.5" />
+ <Setter Property="Template">
+ <ControlTemplate>
+ <DockPanel LastChildFill="True"
+ Background="Transparent"
+ x:CompileBindings="True" x:DataType="walletcoins:WalletCoinViewModel">
+ <i:Interaction.Behaviors>
+ <behaviors:ExecuteCommandOnDoubleTapped Command="{Binding ToggleSelectCommand, Mode=OneWay}"/>
+ </i:Interaction.Behaviors>
+ <Border Name="PART_SelectionIndicator"
+ BorderThickness="2 0 0 0"
+ DockPanel.Dock="Left"
+ VerticalAlignment="Stretch" />
+ <Panel>
+ <Rectangle Name="BackgroundRectangle" />
+ <TreeDataGridCellsPresenter Name="PART_CellsPresenter"
+ ElementFactory="{TemplateBinding ElementFactory}"
+ Items="{TemplateBinding Columns}"
+ Rows="{TemplateBinding Rows}" />
+ </Panel>
+ </DockPanel>
+ </ControlTemplate>
+ </Setter>
</Style>
</TreeDataGrid.Styles>
</TreeDataGrid>

Add double tapped support for WalletCoinsView