PrivacyBar - moved XAML to its own control
ADD
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/PrivacyBar/PrivacyBar.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:i="using:Avalonia.Xaml.Interactivity"
+ xmlns:controls="clr-namespace:WalletWasabi.Fluent.Controls"
+ xmlns:tiles="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles"
+ xmlns:behaviors="using:WalletWasabi.Fluent.Behaviors"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ x:Class="WalletWasabi.Fluent.Views.Wallets.Home.Tiles.PrivacyBar">
+ <Panel x:Name="Panel" DockPanel.Dock="Bottom" Margin="0 0 0 8">
+ <i:Interaction.Behaviors>
+ <behaviors:BoundsObserverBehavior Bounds="{Binding #Panel.Bounds, Mode=OneWay}"
+ Width="{Binding PrivacyBar.Width, Mode=TwoWay}"
+ x:CompileBindings="False" />
+ </i:Interaction.Behaviors>
+
+ <Button Classes="plain" Command="{Binding ShowDetailsCommand}"
+ ToolTip.Tip="Show Details">
+ <ItemsControl Items="{Binding PrivacyBar.Items}" Height="10">
+ <ItemsControl.Styles>
+ <Style Selector="Path.private">
+ <Setter Property="Fill" Value="{DynamicResource PrivacyLevelStrongBrush}" />
+ </Style>
+
+ <Style Selector="Path.semiPrivate">
+ <Setter Property="Fill" Value="{DynamicResource PrivacyLevelMediumBrush}" />
+ </Style>
+
+ <Style Selector="Path.nonPrivate">
+ <Setter Property="Fill" Value="{DynamicResource PrivacyLevelNoneBrush}" />
+ </Style>
+ </ItemsControl.Styles>
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <Panel />
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Path Data="{Binding Data}"
+ Classes.private="{Binding IsPrivate}"
+ Classes.semiPrivate="{Binding IsSemiPrivate}"
+ Classes.nonPrivate="{Binding IsNonPrivate}" />
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </Button>
+ </Panel>
+</UserControl>

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

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/PrivacyControlTileView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/PrivacyControlTileView.axaml
xmlns:i="using:Avalonia.Xaml.Interactivity"
xmlns:controls="clr-namespace:WalletWasabi.Fluent.Controls"
xmlns:tiles="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles"
+ xmlns:tilesView="clr-namespace:WalletWasabi.Fluent.Views.Wallets.Home.Tiles"
xmlns:behaviors="using:WalletWasabi.Fluent.Behaviors"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:CompileBindings="True" x:DataType="tiles:PrivacyControlTileViewModel"
</StackPanel>
</StackPanel>
- <Panel x:Name="Panel" DockPanel.Dock="Bottom" Margin="0 0 0 8"
- IsVisible="{Binding ShowPrivacyBar}">
- <i:Interaction.Behaviors>
- <behaviors:BoundsObserverBehavior Bounds="{Binding #Panel.Bounds, Mode=OneWay}"
- Width="{Binding PrivacyBar.Width, Mode=TwoWay}"
- x:CompileBindings="False" />
- </i:Interaction.Behaviors>
-
- <Button Classes="plain" Command="{Binding ShowDetailsCommand}"
- ToolTip.Tip="Show Details">
- <ItemsControl Items="{Binding PrivacyBar.Items}" Height="10">
- <ItemsControl.Styles>
- <Style Selector="Path.private">
- <Setter Property="Fill" Value="{DynamicResource PrivacyLevelStrongBrush}" />
- </Style>
-
- <Style Selector="Path.semiPrivate">
- <Setter Property="Fill" Value="{DynamicResource PrivacyLevelMediumBrush}" />
- </Style>
-
- <Style Selector="Path.nonPrivate">
- <Setter Property="Fill" Value="{DynamicResource PrivacyLevelNoneBrush}" />
- </Style>
- </ItemsControl.Styles>
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <Panel />
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Path Data="{Binding Data}"
- Classes.private="{Binding IsPrivate}"
- Classes.semiPrivate="{Binding IsSemiPrivate}"
- Classes.nonPrivate="{Binding IsNonPrivate}" />
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </Button>
- </Panel>
+ <tilesView:PrivacyBar DockPanel.Dock="Bottom" Margin="0 0 0 8"
+ IsVisible="{Binding ShowPrivacyBar}" />
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 3">

PrivacyBar - moved XAML to its own control