Description:
I have question about how BarManager operates with Visual Form Inheritance. We have a base form, which has some standard menu items like File, Edit, Help. In one of the child forms, we need to add another menu item say Orders. This menu item needs to go between Edit and Help. In the IDE I am able to put Orders between Edit and Help. But when the app runs, the Orders menu item shows up after the Help menu item.
Is there a way to prevent this from happening?
Answer:
This problem is actually caused by a limitation of the Visual Form Inheritance mechanism. Note that the Bar.ItemLinks property is a collection. VFI does not fully support collections. It does not inherit collections as one might expect. Collections are simply copied. So, you cannot change collections on derived forms, you can just add new elements. Thus, the newly added items are displayed at the last position on a toolbar.
As the most effective solution in this instance, we recommend that you create all the required toolbars and items at design time, but manage item links programmatically. This way, there is no need to store collections. Another approach is to put Item Links on toolbars only on those forms, which are actually used in your application, not on base forms.
See Also:
Can I use the grid on an inherited form or user control?
How to enable visual inheritance for Developer Express controls
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.