add preliminary behavior for adding a shared state for selection indicators
ADD
WalletWasabi.Fluent/Behaviors/NavigationSelectedItemAdornerBehavior.cs
+using System;
+using System.Reactive.Disposables;
+using Avalonia;
+using Avalonia.Controls;
+
+namespace WalletWasabi.Fluent.Behaviors;
+
+public class NavBarSelectedIndicatorParentBehavior : DisposingBehavior<Control>
+{
+ private static readonly AttachedProperty<NavBarSelectedIndicatorState>
+ ParentStateProperty =
+ AvaloniaProperty.RegisterAttached<Control, Control, NavBarSelectedIndicatorState>("ParentState",
+ inherits: true);
+
+ private static NavBarSelectedIndicatorState GetParentState(Control element)
+ {
+ return element.GetValue(ParentStateProperty);
+ }
+
+ private static void SetParentState(Control element, NavBarSelectedIndicatorState value)
+ {
+ element.SetValue(ParentStateProperty, value);
+ }
+
+ protected override void OnAttached(CompositeDisposable disposables)
+ {
+ var k = new NavBarSelectedIndicatorState();
+ disposables.Add(k);
+ SetParentState(AssociatedObject, k);
+ }
+}
+
+public class NavBarSelectedIndicatorState : IDisposable
+{
+ public void Dispose()
+ {
+
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/NavBar/NavBar.axaml
WalletWasabi.Fluent/Views/NavBar/NavBar.axaml
xmlns:conv="using:WalletWasabi.Fluent.Converters"
xmlns:vm="using:WalletWasabi.Fluent.ViewModels.NavBar"
xmlns:vmw="using:WalletWasabi.Fluent.ViewModels.Wallets"
+ xmlns:behaviors="clr-namespace:WalletWasabi.Fluent.Behaviors"
x:DataType="vm:NavBarViewModel"
x:CompileBindings="True"
mc:Ignorable="d" d:DesignWidth="280" d:DesignHeight="459"
x:Class="WalletWasabi.Fluent.Views.NavBar.NavBar" UseLayoutRounding="False"
Name="NavBarUserControl">
+ <i:Interaction.Behaviors>
+ <behaviors:NavBarSelectedIndicatorParentBehavior/>
+ </i:Interaction.Behaviors>
<UserControl.Styles>
<Style Selector="PathIcon">
<Setter Property="Margin" Value="13 0 0 0" />

add preliminary behavior for adding a shared state for selection indicators