Refactor column templates before converting to TreeDataGrid
ADD
WalletWasabi.Fluent/Views/Wallets/Receive/Columns/ActionsColumnView.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:c="using:WalletWasabi.Fluent.Controls"
+ xmlns:receive="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Receive"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ x:DataType="receive:ReceiveAddressesViewModel"
+ x:CompileBindings="True"
+ x:Class="WalletWasabi.Fluent.Views.Wallets.Receive.Columns.ActionsColumnView">
+ <Panel>
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"
+ Margin="-5 0 0 0" Spacing="5" Orientation="Horizontal"
+ x:DataType="receive:AddressViewModel">
+ <Button Classes="plain addressActionButton"
+ Margin="0"
+ Command="{Binding HideAddressCommand}"
+ ToolTip.Tip="Hide address">
+ <PathIcon Data="{StaticResource dismiss_light}" Classes=" addressActionIcon" />
+ </Button>
+
+ <c:AnimatedButton Classes="addressActionButton" DockPanel.Dock="Right"
+ Margin="0"
+ ToolTip.Tip="Copy"
+ Command="{Binding CopyAddressCommand}"
+ NormalIcon="{StaticResource copy_regular}"
+ ClickIcon="{StaticResource copy_confirmed}"
+ InitialOpacity="1.0" />
+
+ <Button Classes="plain addressActionButton"
+ Margin="0"
+ Command="{Binding NavigateCommand}"
+ DockPanel.Dock="Right"
+ ToolTip.Tip="QR Code">
+ <PathIcon Data="{StaticResource qr_code_regular}" Classes=" addressActionIcon" />
+ </Button>
+ </StackPanel>
+ </Panel>
+</UserControl>

ADD
WalletWasabi.Fluent/Views/Wallets/Receive/Columns/ActionsColumnView.axaml.cs
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace WalletWasabi.Fluent.Views.Wallets.Receive.Columns;
+
+public partial class ActionsColumnView : UserControl
+{
+ public ActionsColumnView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+}
\ No newline at end of file

ADD
WalletWasabi.Fluent/Views/Wallets/Receive/Columns/AddressColumnView.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:c="using:WalletWasabi.Fluent.Controls"
+ xmlns:receive="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Receive"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ x:DataType="receive:ReceiveAddressesViewModel"
+ x:CompileBindings="True"
+ x:Class="WalletWasabi.Fluent.Views.Wallets.Receive.Columns.AddressColumnView">
+ <DockPanel LastChildFill="True" Margin="10 0" x:DataType="receive:AddressViewModel">
+ <c:PrivacyContentControl Content="{Binding Address}" VerticalAlignment="Center"
+ Classes="monoSpaced"
+ NumberOfPrivacyChars="38" />
+ </DockPanel>
+</UserControl>

ADD
WalletWasabi.Fluent/Views/Wallets/Receive/Columns/AddressColumnView.axaml.cs
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace WalletWasabi.Fluent.Views.Wallets.Receive.Columns;
+
+public partial class AddressColumnView : UserControl
+{
+ public AddressColumnView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+}
\ No newline at end of file

ADD
WalletWasabi.Fluent/Views/Wallets/Receive/Columns/LabelsColumnView.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:c="using:WalletWasabi.Fluent.Controls"
+ xmlns:receive="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Receive"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ x:DataType="receive:ReceiveAddressesViewModel"
+ x:CompileBindings="True"
+ x:Class="WalletWasabi.Fluent.Views.Wallets.Receive.Columns.LabelsColumnView">
+ <DockPanel LastChildFill="True" Margin="10 0 30 0" x:DataType="receive:AddressViewModel">
+ <c:PrivacyContentControl PrivacyReplacementMode="Text" NumberOfPrivacyChars="15"
+ VerticalAlignment="Center">
+ <DockPanel LastChildFill="False">
+ <Button Classes="labelFlyout"
+ DockPanel.Dock="Left"
+ HorizontalAlignment="Stretch"
+ VerticalAlignment="Center"
+ IsVisible="{Binding !!Label.Count}"
+ IsHitTestVisible="False"
+ Margin="0 4 4 0">
+ <TextBlock Text="{Binding Label[0], FallbackValue=''}"
+ MaxWidth="120"
+ TextTrimming="CharacterEllipsis" />
+ </Button>
+ <Button Classes="labelFlyout"
+ DockPanel.Dock="Left"
+ IsVisible="{Binding !!FilteredLabel.Count}"
+ Content="..."
+ Margin="0 4 5 0">
+ <Button.Flyout>
+ <Flyout Placement="BottomEdgeAlignedLeft" ShowMode="TransientWithDismissOnPointerMoveAway">
+ <c:TagsBox IsReadOnly="True"
+ Items="{Binding FilteredLabel}" />
+ </Flyout>
+ </Button.Flyout>
+ <ToolTip.Tip>
+ <Panel>
+ <c:TagsBox IsReadOnly="True"
+ Margin="4,6,0,0"
+ Items="{Binding FilteredLabel}" />
+ </Panel>
+ </ToolTip.Tip>
+ </Button>
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"
+ Margin="-5 0 0 0" Spacing="5" Orientation="Horizontal"
+ x:DataType="receive:AddressViewModel"
+ DockPanel.Dock="Right">
+ <Button Classes="plain addressActionButton" ToolTip.Tip="Edit"
+ Command="{Binding EditLabelCommand}">
+ <PathIcon Data="{StaticResource edit_regular}" Classes="addressActionIcon" />
+ </Button>
+ </StackPanel>
+ </DockPanel>
+ </c:PrivacyContentControl>
+ </DockPanel>
+</UserControl>

ADD
WalletWasabi.Fluent/Views/Wallets/Receive/Columns/LabelsColumnView.axaml.cs
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace WalletWasabi.Fluent.Views.Wallets.Receive.Columns;
+
+public partial class LabelsColumnView : UserControl
+{
+ public LabelsColumnView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/Wallets/Receive/ReceiveAddressesView.axaml
WalletWasabi.Fluent/Views/Wallets/Receive/ReceiveAddressesView.axaml
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:c="using:WalletWasabi.Fluent.Controls"
xmlns:receive="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Receive"
- xmlns:behaviors="clr-namespace:WalletWasabi.Fluent.Behaviors"
- xmlns:historyItems="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Home.History.HistoryItems"
+ xmlns:columns="clr-namespace:WalletWasabi.Fluent.Views.Wallets.Receive.Columns"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:DataType="receive:ReceiveAddressesViewModel"
x:CompileBindings="True"
CanUserSort="False">
<DataBoxTemplateColumn.CellTemplate>
<DataTemplate>
- <Panel>
- <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"
- Margin="-5 0 0 0" Spacing="5" Orientation="Horizontal"
- x:DataType="receive:AddressViewModel">
- <Button Classes="plain addressActionButton"
- Margin="0"
- Command="{Binding HideAddressCommand}"
- ToolTip.Tip="Hide address">
- <PathIcon Data="{StaticResource dismiss_light}" Classes=" addressActionIcon" />
- </Button>
-
- <c:AnimatedButton Classes="addressActionButton" DockPanel.Dock="Right"
- Margin="0"
- ToolTip.Tip="Copy"
- Command="{Binding CopyAddressCommand}"
- NormalIcon="{StaticResource copy_regular}"
- ClickIcon="{StaticResource copy_confirmed}"
- InitialOpacity="1.0" />
-
- <Button Classes="plain addressActionButton"
- Margin="0"
- Command="{Binding NavigateCommand}"
- DockPanel.Dock="Right"
- ToolTip.Tip="QR Code">
- <PathIcon Data="{StaticResource qr_code_regular}" Classes=" addressActionIcon" />
- </Button>
- </StackPanel>
- </Panel>
+ <columns:ActionsColumnView />
</DataTemplate>
</DataBoxTemplateColumn.CellTemplate>
</DataBoxTemplateColumn>
CanUserSort="True">
<DataBoxTemplateColumn.CellTemplate>
<DataTemplate>
- <DockPanel LastChildFill="True" Margin="10 0" x:DataType="receive:AddressViewModel">
- <c:PrivacyContentControl Content="{Binding Address}" VerticalAlignment="Center"
- Classes="monoSpaced"
- NumberOfPrivacyChars="38" />
- </DockPanel>
+ <columns:AddressColumnView />
</DataTemplate>
</DataBoxTemplateColumn.CellTemplate>
</DataBoxTemplateColumn>
CanUserSort="True">
<DataBoxTemplateColumn.CellTemplate>
<DataTemplate>
- <DockPanel LastChildFill="True" Margin="10 0 30 0" x:DataType="receive:AddressViewModel">
- <c:PrivacyContentControl PrivacyReplacementMode="Text" NumberOfPrivacyChars="15"
- VerticalAlignment="Center">
- <DockPanel LastChildFill="False">
- <Button Classes="labelFlyout"
- DockPanel.Dock="Left"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Center"
- IsVisible="{Binding !!Label.Count}"
- IsHitTestVisible="False"
- Margin="0 4 4 0">
- <TextBlock Text="{Binding Label[0], FallbackValue=''}"
- MaxWidth="120"
- TextTrimming="CharacterEllipsis" />
- </Button>
- <Button Classes="labelFlyout"
- DockPanel.Dock="Left"
- IsVisible="{Binding !!FilteredLabel.Count}"
- Content="..."
- Margin="0 4 5 0">
- <Button.Flyout>
- <Flyout Placement="BottomEdgeAlignedLeft" ShowMode="TransientWithDismissOnPointerMoveAway">
- <c:TagsBox IsReadOnly="True"
- Items="{Binding FilteredLabel}" />
- </Flyout>
- </Button.Flyout>
- <ToolTip.Tip>
- <Panel>
- <c:TagsBox IsReadOnly="True"
- Margin="4,6,0,0"
- Items="{Binding FilteredLabel}" />
- </Panel>
- </ToolTip.Tip>
- </Button>
- <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"
- Margin="-5 0 0 0" Spacing="5" Orientation="Horizontal"
- x:DataType="receive:AddressViewModel"
- DockPanel.Dock="Right">
- <Button Classes="plain addressActionButton" ToolTip.Tip="Edit"
- Command="{Binding EditLabelCommand}">
- <PathIcon Data="{StaticResource edit_regular}" Classes="addressActionIcon" />
- </Button>
- </StackPanel>
- </DockPanel>
- </c:PrivacyContentControl>
- </DockPanel>
+ <columns:LabelsColumnView />
</DataTemplate>
</DataBoxTemplateColumn.CellTemplate>
</DataBoxTemplateColumn>

Refactor column templates before converting to TreeDataGrid