Use data templates
MODIFY
WalletWasabi.Fluent/Views/NavBar/NavBar.axaml
WalletWasabi.Fluent/Views/NavBar/NavBar.axaml
xmlns:i="using:Avalonia.Xaml.Interactivity"
xmlns:ia="using:Avalonia.Xaml.Interactions.Core"
xmlns:vm="using:WalletWasabi.Fluent.ViewModels.NavBar"
+ xmlns:vmw="using:WalletWasabi.Fluent.ViewModels.Wallets"
xmlns:rx="using:System.Reactive"
x:DataType="vm:NavBarViewModel"
x:CompileBindings="True"
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" x:CompileBindings="False" />
</Style>
</c:NavBarTreeView.Styles>
- <c:NavBarTreeView.ItemTemplate>
- </c:NavBarTreeView.ItemTemplate>
- <c:NavBarTreeView.DataTemplates>
+ <!-- TODO: TEMP -->
+ <!--<c:NavBarTreeView.ItemTemplate>
<TreeDataTemplate x:DataType="vm:NavBarItemViewModel" ItemsSource="{Binding Items}" x:CompileBindings="False">
<Panel>
<Panel Width="45" HorizontalAlignment="Left">
<TextBlock Text="{Binding Title}" Margin="55 0 0 0" />
</Panel>
</TreeDataTemplate>
+ </c:NavBarTreeView.ItemTemplate>-->
+ <c:NavBarTreeView.DataTemplates>
+ <DataTemplate x:DataType="vmw:WalletViewModelBase" x:CompileBindings="False">
+ <Panel>
+ <Panel Width="45" HorizontalAlignment="Left">
+ <PathIcon HorizontalAlignment="Left">
+ <PathIcon.Data>
+ <Binding Path="IconName" Converter="{x:Static conv:NavBarIconConverter.Instance}" />
+ </PathIcon.Data>
+ </PathIcon>
+ </Panel>
+ <TextBlock Text="{Binding Title}" Margin="55 0 0 0" />
+ </Panel>
+ </DataTemplate>
<DataTemplate x:DataType="vm:SeparatorItemViewModel" x:CompileBindings="False">
<Separator IsHitTestVisible="False"/>
</DataTemplate>

Use data templates