Hide items when navbar is collapsed and selected wallet logged in
MODIFY
WalletWasabi.Fluent/ViewModels/NavBar/NavBarViewModel.cs
WalletWasabi.Fluent/ViewModels/NavBar/NavBarViewModel.cs
@@ -31,6 +31,7 @@ namespace WalletWasabi.Fluent.ViewModels.NavBar
[AutoNotify] private double _currentOpenPaneLength;
[AutoNotify] private double _currentCompactPaneLength;
[AutoNotify] private bool _isHidden;
+ [AutoNotify(SetterModifier = AccessModifier.Private)] private bool _hideItems;
public NavBarViewModel(TargettedNavigationStack mainScreen, WalletManagerViewModel walletManager)
{
@@ -72,6 +73,12 @@ namespace WalletWasabi.Fluent.ViewModels.NavBar
CurrentCompactPaneLength = x ? 0 : NormalCompactPaneLength;
CurrentOpenPaneLength = x ? 0 : NormalOpenPaneLength;
});
+
+ this.WhenAnyValue(x => x.IsOpen, x => x.Actions.Count)
+ .Subscribe(x =>
+ {
+ HideItems = !x.Item1 && x.Item2 > 0;
+ });
}
public ObservableCollection<NavBarItemViewModel> Actions => _walletManager.Actions;

MODIFY
WalletWasabi.Fluent/Views/NavBar/NavBar.axaml
WalletWasabi.Fluent/Views/NavBar/NavBar.axaml
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="!!Actions.Count" />
<Binding Path="!!Items.Count" />
+ <Binding Path="!HideItems" />
</MultiBinding>
</Separator.IsVisible>
</Separator>
<!-- Items List -->
<c:NavBarListBox Items="{Binding Items}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
+ IsVisible="{Binding !HideItems, Mode=OneWay}"
VerticalAlignment="{Binding Actions.Count, Mode=OneWay, Converter={x:Static conv:NavBarItemsListBoxAlignmentConverter.Instance}}">
<!-- TODO: Add animations for NavBarListBox when VerticalAlignment changes Top to Bottom and Bottom to Top -->
<c:NavBarListBox.Styles>

Hide items when navbar is collapsed and selected wallet logged in