MainView Page DataContext:
C#ObservableCollection<NavigationItem> model = new ObservableCollection<NavigationItem>() {
new NavigationItem() { GrupAdi = "Kullanıcı İşlemleri", Baslik = "Kullanıcı Ekle" },
new NavigationItem() { GrupAdi = "Kullanıcı İşlemleri", Baslik = "Kullanıcılar" },
new NavigationItem() { GrupAdi = "Proje İşlemleri", Baslik = "Proje Ekle" },
new NavigationItem() { GrupAdi = "Proje İşlemleri", Baslik = "Item 1" },
new NavigationItem() { GrupAdi = "Proje İşlemleri", Baslik = "Item 1" },
};
this.DataContext = model;
MainView Page XAML ,NavBarControl:
XAML<dxn:NavBarControl Name="navBarControl1" ItemsSource="{Binding}" GroupDescription="GrupAdi">
<dxn:NavBarControl.Resources>
<Style TargetType="dxn:NavBarGroup">
<Setter Property="Header" Value="{Binding}"/>
<Setter Property="dxmvvm:UIRegion.Region" Value="{x:Static common:Regions.Navigation}"/>
</Style>
<Style TargetType="dxn:NavBarItem">
<Setter Property="Content" Value="{Binding Path=Baslik}"/>
</Style>
</dxn:NavBarControl.Resources>
</dxn:NavBarControl>
the following line breaks the grouped item (All content is available for each group.)
but the moduler does not work without that line
XAML<Setter Property="dxmvvm:UIRegion.Region" Value="{x:Static common:Regions.Navigation}"/>
Hi Sinan,
These are two conflicting features.
When GroupDescription is used, NavBarControl creates NavBarGroups and sets the ItemsSource property for each NavBarGroup.
When you set the UIRegion.Region property for NavBarGroup, inner mechanisms set the ItemsSource property too.
That is the problem.
Right now, I do not clearly understand what you are trying to achieve. Please describe your end-task: what should NavBar show? I am looking forward to your response.
Thank you for the clarification. I want to develop Modular Application and Modules are listed in a grouped menu (NavBarControl).
There should be no red striped areas in the picture. Show all modules for each group again
I think I need to customize RegisterModules() method or InjectModules() method