Add Views and main ViewModel
ADD
WalletWasabi.Fluent/Converters/IndentToColorConverter.cs
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using Avalonia.Controls.Models.TreeDataGrid;
+using Avalonia.Data;
+using Avalonia.Data.Converters;
+using Avalonia.Media;
+
+namespace WalletWasabi.Fluent.Converters;
+
+internal class IndentToColorConverter : IMultiValueConverter
+{
+ public static IndentToColorConverter Instance { get; } = new();
+
+ public List<IBrush>? Brushes { get; set; }
+
+ public object Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
+ {
+ var obj = values.Skip(0).First();
+
+ if (obj is null || values.Skip(1).First() is not IRows rows)
+ {
+ return BindingOperations.DoNothing;
+ }
+
+ var rowIndex = FindIndex(rows, el => el.Model == obj);
+ var modelIndex = rows.RowIndexToModelIndex(rowIndex);
+ return GetBrush(modelIndex.Count - 1) ?? BindingOperations.DoNothing;
+ }
+
+ public static int FindIndex<T>(IEnumerable<T> source, Func<T, bool> predicate)
+ {
+ var i = 0;
+ foreach (var item in source)
+ {
+ if (predicate(item))
+ {
+ return i;
+ }
+
+ i++;
+ }
+
+ return -1;
+ }
+
+ private IBrush? GetBrush(int modelIndex)
+ {
+ if (Brushes is null || modelIndex >= Brushes.Count || modelIndex < 0)
+ {
+ return null;
+ }
+
+ return Brushes[modelIndex];
+ }
+}

MODIFY
WalletWasabi.Fluent/Converters/MoneyConverters.cs
WalletWasabi.Fluent/Converters/MoneyConverters.cs
using Avalonia.Data.Converters;
+using NBitcoin;
using WalletWasabi.Fluent.Extensions;
+using WalletWasabi.Fluent.Helpers;
namespace WalletWasabi.Fluent.Converters;
@@ -10,4 +12,7 @@ public static class MoneyConverters
public static readonly IValueConverter ToUsdAproxBetweenParens =
new FuncValueConverter<decimal, string>(n => n.ToUsdAproxBetweenParens());
+
+ public static readonly IValueConverter ToFormattedString =
+ new FuncValueConverter<Money?, string>(money => money is null ? "" : money.ToFormattedString());
}

ADD
WalletWasabi.Fluent/ViewModels/CoinControl/SelectCoinsDialogViewModel.cs
+using System.Collections.Generic;
+using WalletWasabi.Blockchain.TransactionOutputs;
+using WalletWasabi.Fluent.ViewModels.Dialogs.Base;
+using WalletWasabi.Fluent.ViewModels.Wallets;
+using WalletWasabi.Fluent.ViewModels.Wallets.Send;
+
+namespace WalletWasabi.Fluent.ViewModels.CoinControl;
+
+[NavigationMetaData(
+ Title = "Select Coins",
+ Caption = "",
+ IconName = "wallet_action_send",
+ NavBarPosition = NavBarPosition.None,
+ Searchable = false,
+ NavigationTarget = NavigationTarget.DialogScreen)]
+public partial class SelectCoinsDialogViewModel : DialogViewModelBase<IEnumerable<SmartCoin>>
+{
+ public SelectCoinsDialogViewModel(WalletViewModel walletViewModel, TransactionInfo info, IEnumerable<SmartCoin> transactionSpentCoins)
+ {
+ SetupCancel(false, true, false);
+ EnableBack = true;
+ }
+}

ADD
WalletWasabi.Fluent/Views/CoinControl/SelectCoinsDialogView.axaml
+<UserControl xmlns="https://github.com/avaloniaui"
+ 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:controls="clr-namespace:WalletWasabi.Fluent.Controls"
+ xmlns:converters="clr-namespace:WalletWasabi.Fluent.Converters"
+ xmlns:generic="clr-namespace:System.Collections.Generic;assembly=System.Collections"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="650"
+ xmlns:coinControl="clr-namespace:WalletWasabi.Fluent.ViewModels.CoinControl"
+ x:DataType="coinControl:SelectCoinsDialogViewModel"
+ x:Class="WalletWasabi.Fluent.Views.CoinControl.SelectCoinsDialogView">
+
+ <controls:ContentArea
+ EnableBack="{Binding EnableBack}"
+ EnableNext="True"
+ NextContent="Continue"
+ EnableCancel="{Binding EnableCancel}"
+ IsBusy="{Binding IsBusy}"
+ ScrollViewer.VerticalScrollBarVisibility="Disabled">
+
+ <controls:ContentArea.Styles>
+ <Style Selector="TreeDataGridRow">
+ <Setter Property="Focusable" Value="False" />
+ <Setter Property="Height" Value="37.5" />
+ </Style>
+
+ <Style Selector="TreeDataGridRow" x:CompileBindings="False">
+ <Style.Resources>
+ <converters:IndentToColorConverter x:Key="IndentToBrushConverter">
+ <converters:IndentToColorConverter.Brushes>
+ <generic:List x:TypeArguments="IBrush">
+ <SolidColorBrush>Transparent</SolidColorBrush>
+ <SolidColorBrush Color="{DynamicResource SystemListLowColor}" />
+ </generic:List>
+ </converters:IndentToColorConverter.Brushes>
+ </converters:IndentToColorConverter>
+ </Style.Resources>
+ <Setter Property="Template">
+ <ControlTemplate TargetType="TreeDataGridRow">
+ <Border x:Name="RowBorder"
+ BorderBrush="{TemplateBinding BorderBrush}"
+ BorderThickness="{TemplateBinding BorderThickness}"
+ CornerRadius="{TemplateBinding CornerRadius}"
+ Padding="0">
+ <Border.Background>
+ <MultiBinding Converter="{StaticResource IndentToBrushConverter}">
+ <Binding Path="." />
+ <Binding Path="Rows" RelativeSource="{RelativeSource Mode=TemplatedParent}" />
+ </MultiBinding>
+ </Border.Background>
+ <TreeDataGridCellsPresenter x:Name="PART_CellsPresenter"
+ ElementFactory="{TemplateBinding ElementFactory}"
+ Items="{TemplateBinding Columns}"
+ Rows="{TemplateBinding Rows}" />
+ </Border>
+ </ControlTemplate>
+ </Setter>
+ </Style>
+
+ <Style Selector="TreeDataGridExpanderCell">
+ <Setter Property="Template">
+ <ControlTemplate>
+ <Border Background="{TemplateBinding Background}">
+ <DockPanel>
+ <Border DockPanel.Dock="Left"
+ Margin="4 0"
+ Width="12" Height="12">
+ <ToggleButton Classes="ExpandCollapseChevron"
+ Focusable="False"
+ IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}"
+ IsVisible="{TemplateBinding ShowExpander}"
+ Cursor="Hand" />
+ </Border>
+ <Decorator Name="PART_Content" />
+ </DockPanel>
+ </Border>
+ </ControlTemplate>
+ </Setter>
+ </Style>
+
+ <Style Selector="TreeDataGridRow ContentPresenter">
+ <Setter Property="VerticalAlignment" Value="Center" />
+ </Style>
+
+ <Style Selector="TreeDataGridTemplateCell > ContentPresenter">
+ <Setter Property="Margin" Value="5 0 10 0" />
+ </Style>
+
+ <Style Selector="ContentPresenter > TextBlock">
+ <Setter Property="FontFamily" Value="{StaticResource MonospacedFont}" />
+ </Style>
+
+ </controls:ContentArea.Styles>
+
+ <controls:ContentArea.Title>
+ <TextBox Text="{Binding SearchFilter, Mode=TwoWay}" Watermark="Search label">
+ <TextBox.Styles>
+ <Style Selector="TextBox /template/ DataValidationErrors">
+ <Setter Property="IsVisible" Value="False" />
+ </Style>
+ </TextBox.Styles>
+ </TextBox>
+ </controls:ContentArea.Title>
+
+ <DockPanel>
+
+ <Panel DockPanel.Dock="Bottom" Margin="0 12 0 0" TextBlock.Foreground="{DynamicResource AcrylicTrimForeground}">
+ <ProgressBar Height="25" Maximum="{Binding RequiredAmount^.Satoshi}" Value="{Binding SelectedAmount^.Satoshi, Mode=OneWay}" />
+ <TextBlock Classes="h8" Margin="10 0" VerticalAlignment="Center" Text="{Binding SelectedAmount^, Converter={x:Static converters:MoneyConverters.ToFormattedString}, StringFormat='{}{0} BTC selected'}" />
+ <TextBlock Classes="h8" Margin="10 0" HorizontalAlignment="Right" VerticalAlignment="Center" IsVisible="{Binding !EnoughSelected^}"
+ Text="{Binding RemainingAmount^, Converter={x:Static converters:MoneyConverters.ToFormattedString}, StringFormat='{}{0} BTC remaining'}" />
+ </Panel>
+
+ <TreeDataGrid Source="{Binding LabelBasedSelection.Source}" CanUserSortColumns="True" />
+
+ </DockPanel>
+
+ </controls:ContentArea>
+</UserControl>

ADD
WalletWasabi.Fluent/Views/CoinControl/SelectCoinsDialogView.axaml.cs
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace WalletWasabi.Fluent.Views.CoinControl;
+
+public class SelectCoinsDialogView : UserControl
+{
+ public SelectCoinsDialogView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+}

Add Views and main ViewModel