Ticket T557108
Visible to All Users

Modular Application and grouped module Navigation

created 8 years ago

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}"/>
Comments (2)
DevExpress Support Team 8 years ago

    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

      Answers approved by DevExpress Support

      created 8 years ago (modified 8 years ago)

      I have attached a sample to demonstrate how to do this. Please review it and let me know if you need further assistance.

        Comments (2)

          Thank you so much.

          DevExpress Support Team 8 years ago

            You are welcome!

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.