Hi,
I can add groups and items to a NavBarControl using code, but couldn't find a way how to add a separator line between two NavBar items.
Would you have a code fragment to show how this can be achieved?
Thanks,
ktp
Hi,
I can add groups and items to a NavBarControl using code, but couldn't find a way how to add a separator line between two NavBar items.
Would you have a code fragment to show how this can be achieved?
Thanks,
ktp
Hello,
You can use the following code to create a separator:
C#NavBarItem separator = <your NavBarControl>.Items.Add(true);
Visual BasicDim separator As NavBarItem = <you NavBarControl>.Items.Add(True)
To add it to a required place, insert this item to the NavBarGroup.ItemLinks collection using a specific order. In following example, the separator will be located in the group between item1 and item2:
C#<your NavBarGroup>.ItemLinks.AddRange( new DevExpress.XtraNavBar.NavBarItemLink[] {
new DevExpress.XtraNavBar.NavBarItemLink(item1),
new DevExpress.XtraNavBar.NavBarItemLink(separator),
new DevExpress.XtraNavBar.NavBarItemLink(item2)
});
//the separator will be located in the group between item1 and item2
Visual Basic<your NavBarGroup>.ItemLinks.AddRange(New DevExpress.XtraNavBar.NavBarItemLink() { _
New DevExpress.XtraNavBar.NavBarItemLink(item1), _
New DevExpress.XtraNavBar.NavBarItemLink(separator), _
New DevExpress.XtraNavBar.NavBarItemLink(item2), _
})
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.