Move NavBarItem styles to user control as they are reduntant
MODIFY
WalletWasabi.Fluent/Views/NavBar/NavBar.axaml
WalletWasabi.Fluent/Views/NavBar/NavBar.axaml
<Setter Property="Background" Value="Transparent" />
<Setter Property="Padding" Value="0" />
</Style>
+ <Style Selector="ListBox:vertical > c|NavBarItem">
+ <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" x:CompileBindings="False" />
+ <Setter Property="IsHitTestVisible" Value="{Binding IsEnabled}" x:CompileBindings="False" />
+ <Setter Property="Focusable" Value="{Binding IsEnabled}" x:CompileBindings="False" />
+ <Setter Property="IsEnabled" Value="{Binding IsEnabled}" x:CompileBindings="False" />
+ </Style>
+ <Style Selector="ListBox:vertical > c|NavBarItem:disabled PathIcon">
+ <Setter Property="Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
+ </Style>
+ <Style Selector="ListBox:horizontal > c|NavBarItem">
+ <Setter Property="IndicatorOrientation" Value="Horizontal" />
+ <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" x:CompileBindings="False" />
+ <Setter Property="IsHitTestVisible" Value="{Binding IsEnabled}" x:CompileBindings="False" />
+ <Setter Property="Focusable" Value="{Binding IsEnabled}" x:CompileBindings="False" />
+ <Setter Property="IsEnabled" Value="{Binding IsEnabled}" x:CompileBindings="False" />
+ </Style>
+ <Style Selector="ListBox:horizontal > c|NavBarItem:disabled PathIcon">
+ <Setter Property="Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
+ </Style>
<Style Selector="c|NavBarTreeItem">
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" x:CompileBindings="False" />
</Style>
<!-- TopItems List -->
<c:NavBarListBox Items="{Binding TopItems}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
- Name="TopListBox">
- <c:NavBarListBox.Styles>
- <Style Selector="c|NavBarItem">
- <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" x:CompileBindings="False" />
- <Setter Property="IsHitTestVisible" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- <Setter Property="Focusable" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- <Setter Property="IsEnabled" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- </Style>
- <Style Selector="c|NavBarItem:disabled PathIcon">
- <Setter Property="Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
- </Style>
- </c:NavBarListBox.Styles>
+ Name="TopListBox"
+ Classes="vertical">
<c:NavBarListBox.ItemTemplate>
<DataTemplate x:DataType="vm:NavBarItemViewModel" x:CompileBindings="False">
<Panel>
<c:NavBarListBox Items="{Binding SelectedWallets}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
Name="SelectedWalletListBox"
+ Classes="vertical"
RenderTransformOrigin="0%,50%">
<c:NavBarListBox.Styles>
<Style Selector=":is(ListBox):not(:empty)">
</Animation>
</Style.Animations>
</Style>
- <Style Selector="c|NavBarItem">
- <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" x:CompileBindings="False" />
- <Setter Property="IsHitTestVisible" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- <Setter Property="Focusable" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- <Setter Property="IsEnabled" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- </Style>
- <Style Selector="c|NavBarItem:disabled PathIcon">
- <Setter Property="Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
- </Style>
</c:NavBarListBox.Styles>
<c:NavBarListBox.DataTemplates>
<DataTemplate DataType="vmw:WalletViewModelBase">
<c:NavBarListBox Items="{Binding Actions}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
Name="ActionsListBox"
+ Classes="horizontal"
RenderTransformOrigin="0%,50%">
<c:NavBarListBox.Styles>
<Style Selector=":is(ListBox)">
</Animation>
</Style.Animations>
</Style>
- <Style Selector="c|NavBarItem">
- <Setter Property="IndicatorOrientation" Value="Horizontal" />
- <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" x:CompileBindings="False" />
- <Setter Property="IsHitTestVisible" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- <Setter Property="Focusable" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- <Setter Property="IsEnabled" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- </Style>
- <Style Selector="c|NavBarItem:disabled PathIcon">
- <Setter Property="Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
- </Style>
</c:NavBarListBox.Styles>
<c:NavBarListBox.DataTemplates>
<DataTemplate DataType="vm:NavBarItemViewModel">
<!-- BottomItems List -->
<c:NavBarListBox Items="{Binding BottomItems}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
- Name="BottomListBox">
+ Name="BottomListBox"
+ Classes="horizontal">
<c:NavBarListBox.Styles>
<Style Selector=":is(ListBox)">
<Setter Property="ItemsPanel">
</Setter.Value>
</Setter>
</Style>
- <Style Selector="c|NavBarItem">
- <Setter Property="IndicatorOrientation" Value="Horizontal" />
- <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" x:CompileBindings="False" />
- <Setter Property="IsHitTestVisible" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- <Setter Property="Focusable" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- <Setter Property="IsEnabled" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- </Style>
- <Style Selector="c|NavBarItem:disabled PathIcon">
- <Setter Property="Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
- </Style>
</c:NavBarListBox.Styles>
<c:NavBarListBox.ItemTemplate>
<DataTemplate x:DataType="vm:NavBarItemViewModel">
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
IsVisible="{Binding !HideItems, Mode=OneWay}"
Name="ItemsListBox"
+ Classes="vertical"
RenderTransformOrigin="0%,50%"
VerticalAlignment="{Binding Actions.Count, Mode=OneWay, Converter={x:Static conv:NavBarItemsListBoxAlignmentConverter.Instance}}">
<c:NavBarListBox.Styles>
</Animation>
</Style.Animations>
</Style>
- <Style Selector="c|NavBarItem">
- <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" x:CompileBindings="False" />
- <Setter Property="IsHitTestVisible" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- <Setter Property="Focusable" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- <Setter Property="IsEnabled" Value="{Binding IsEnabled}" x:CompileBindings="False" />
- </Style>
- <Style Selector="c|NavBarItem:disabled PathIcon">
- <Setter Property="Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
- </Style>
</c:NavBarListBox.Styles>
<c:NavBarListBox.DataTemplates>
<DataTemplate DataType="vmw:WalletViewModelBase">

Move NavBarItem styles to user control as they are reduntant