Hello,
I am struggling to get this working for way too long now. All I want is to bind an ObservableCollection of type "MonitorModule" to my NavigationBar. This is a custom class with INotifyPropertyChanged implemented correctly.
As I would think all I have to do is what I'm currently trying:
<navigation:NavigationBar x:Name="NavBar" Grid.Column="0" ContentWidth="180" IsMinimizable="True" IsCustomizationEnabled="False" BorderThickness="0"
SelectionChanged="NavBar_OnSelectionChanged" Grid.RowSpan="3" IsMinimized="False" Title="Modules" ItemsSource="{Binding Modules}">
<navigation:NavigationBar.ItemTemplate>
<DataTemplate DataType="{x:Type monitor:MonitorModule}">
<navigation:NavigationPane ImageSourceLarge="{Binding LargePanelIcon}" Header="{Binding Title}" ImageSourceSmall="{Binding SmallPanelIcon}" />
</DataTemplate>
</navigation:NavigationBar.ItemTemplate>
</navigation:NavigationBar>
But when I test my application all I see is a lot of nothing. The pane is empty. No icon, no title - but it exists and can be selected. When I click it, the "module" is being shown in the content of the NavBar (the module is a UserControl with a set attribute of ContentProperty).
But I'd want to actually show the content by using the property "PanelContent", which doesn't work either.
What am I doing wrong? Isn't this the general WPF approach of using custom data? Is it a bug or am I completely wrong? If this doesn't work soon, I'll make it on my own...
Thank you!
Greetings
Manuel