add navbaritem control.
ADD
WalletWasabi.Fluent/Controls/NavBarItem.cs
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Controls.Mixins;
+using Avalonia.Controls.Primitives;
+using Avalonia.Input;
+
+namespace WalletWasabi.Fluent.Controls
+{
+ public class NavBarItem : ContentControl
+ {
+ /// <summary>
+ /// Initializes static members of the <see cref="NavBarItem"/> class.
+ /// </summary>
+ static NavBarItem ()
+ {
+ SelectableMixin.Attach<NavBarItem>(IsSelectedProperty);
+ PressedMixin.Attach<NavBarItem>();
+ FocusableProperty.OverrideDefaultValue<NavBarItem>(true);
+ }
+
+ /// <summary>
+ /// Defines the <see cref="IsSelected"/> property.
+ /// </summary>
+ public static readonly StyledProperty<bool> IsSelectedProperty =
+ AvaloniaProperty.Register<NavBarItem, bool>(nameof(IsSelected));
+
+ /// <summary>
+ /// Gets or sets the selection state of the item.
+ /// </summary>
+ public bool IsSelected
+ {
+ get { return GetValue(IsSelectedProperty); }
+ set { SetValue(IsSelectedProperty, value); }
+ }
+ }
+}

ADD
WalletWasabi.Fluent/Controls/NavBarItem.xaml
+<Styles xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:c="clr-namespace:WalletWasabi.Fluent.Controls">
+ <Design.PreviewWith>
+ <Border Padding="0">
+ <c:NavBarItem />
+ </Border>
+ </Design.PreviewWith>
+ <Styles.Resources>
+ <Thickness x:Key="ListBoxItemPadding">12,9,12,12</Thickness>
+ </Styles.Resources>
+ <Style Selector="c|NavBarItem">
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="Padding" Value="{StaticResource ListBoxItemPadding}" />
+ <Setter Property="HorizontalContentAlignment" Value="Left" />
+ <Setter Property="VerticalContentAlignment" Value="Center" />
+ <Setter Property="BorderThickness" Value="2 0 0 0 " />
+ <Setter Property="Template">
+ <ControlTemplate>
+ <Border x:Name="LayoutRoot" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
+ <Panel>
+
+ <Rectangle x:Name="PressedBackground" IsHitTestVisible="False" />
+ <ContentPresenter Name="PART_ContentPresenter"
+ Background="{TemplateBinding Background}"
+ BorderBrush="{TemplateBinding BorderBrush}"
+ BorderThickness="{TemplateBinding BorderThickness}"
+ ContentTemplate="{TemplateBinding ContentTemplate}"
+ Content="{TemplateBinding Content}"
+ Padding="{TemplateBinding Padding}"
+ VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
+ HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
+
+ </Panel>
+ </Border>
+ </ControlTemplate>
+ </Setter>
+ </Style>
+
+ <Style Selector="c|NavBarItem /template/ ContentPresenter">
+ <Setter Property="TextBlock.FontWeight" Value="Normal" />
+ <Setter Property="TextBlock.FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
+ </Style>
+
+ <!-- Disabled State -->
+ <Style Selector="c|NavBarItem:disabled /template/ ContentPresenter">
+ <Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlDisabledBaseMediumLowBrush}"/>
+ </Style>
+
+ <!-- PointerOver State -->
+ <Style Selector="c|NavBarItem:pointerover /template/ Border">
+ <Setter Property="BorderBrush" Value="{DynamicResource SystemAccentColor}"/>
+ </Style>
+ <Style Selector="c|NavBarItem:pointerover /template/ ContentPresenter">
+ <Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlHighlightAltBaseHighBrush}"/>
+ </Style>
+
+ <!-- Pressed State -->
+ <Style Selector="c|NavBarItem:pressed /template/ Border">
+ <Setter Property="BorderBrush" Value="{DynamicResource SystemAccentColorLight1}"/>
+ </Style>
+ <Style Selector="c|NavBarItem:pressed /template/ ContentPresenter">
+ <Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlHighlightAltBaseHighBrush}"/>
+ </Style>
+
+ <!-- Selected State -->
+ <Style Selector="c|NavBarItem:selected /template/ Rectangle#PressedBackground">
+ <Setter Property="Fill" Value="{DynamicResource SystemControlHighlightListAccentLowBrush}"/>
+ </Style>
+ <Style Selector="c|NavBarItem:selected /template/ ContentPresenter">
+ <Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlHighlightAltBaseHighBrush}"/>
+ </Style>
+
+ <!-- Selected Unfocused State -->
+ <Style Selector="c|NavBarItem:selected:not(:focus) /template/ Rectangle#PressedBackground">
+ <Setter Property="Fill" Value="{DynamicResource SystemControlHighlightListAccentLowBrush}"/>
+ </Style>
+ <Style Selector="c|NavBarItem:selected:not(:focus) /template/ ContentPresenter">
+ <Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlHighlightAltBaseHighBrush}"/>
+ </Style>
+
+ <!-- Selected PointerOver State -->
+ <Style Selector="c|NavBarItem:selected:pointerover /template/ Rectangle#PressedBackground">
+ <Setter Property="Fill" Value="{DynamicResource SystemControlHighlightListAccentMediumBrush}"/>
+ </Style>
+ <Style Selector="c|NavBarItem:selected:pointerover /template/ ContentPresenter">
+ <Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlHighlightAltBaseHighBrush}"/>
+ </Style>
+
+ <!-- Selected Pressed State -->
+ <Style Selector="c|NavBarItem:selected:pressed /template/ Rectangle#PressedBackground">
+ <Setter Property="Fill" Value="{DynamicResource SystemControlHighlightListAccentHighBrush}"/>
+ </Style>
+ <Style Selector="c|NavBarItem:selected:pressed /template/ ContentPresenter">
+ <Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlHighlightAltBaseHighBrush}"/>
+ </Style>
+</Styles>
\ No newline at end of file

add navbaritem control.