Ticket Q346723
Visible to All Users

Looking for NavBarItem binding example

created 14 years ago

I have searched in the documentation and online, but it is still not clear to me how to do populate the NavSideBar through binding.
I have a list of ‘groups’ which each have a list of ‘items’, and I’m looking for a way to bind this to the NavSideView, much like you bind to a TreeView.
Also for the items I would like define different data templates, one per item type (like in a TreeView).
Is there an example somewhere of how to do this with the NavBarControl?,

Comments (3)
Alexander E (DevExpress) 14 years ago

    Hello Jesper,
    Thank you for the question. I have created an example for you, demonstrating how to bind NavBarControl with data and generate a group and items.
    Please take a look at the attached example: How to generate groups and items via ItemsSource and let me know if you have any questions regarding this solution.
    Thanks,
    Alexander.

    JK JK
    Jesper Kristiansen 14 years ago

      It works now, I was missing to bind the ItemsSource on the NavBarGroup,
       <Setter Property="ItemsSource" Value="{Binding Items}"/>
      Thanks you very much.

      Alexander E (DevExpress) 14 years ago

        You are welcome!
        Thanks,
        Alexander.

        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.