Hi Chris,
Accessing the designer generated ParentBarItem component in code and modifying it will not have any effect. Instead you should get hold of a ParentBarItem’s "Merged Equivalent" (combined ParentBarItem consisting of the parent and child form''s ParentBarItems) and add the new BarItem to it as shown below :
ParentBarItem mergedParent = this.mainFrameBarManager1.GetMergedEquivalent(this.parentBarItem1, this.parentBarItem1);
mergedParent.Items.Add(oBarItem);
I have also modified your sample accordingly and have
attached it here.
Please refer to the following KB article for more information on this :
How do I access/modify the main-menu, other bars and ParentBarItems programatically?
This KB article can be accessed at :
http://www.syncfusion.com/Support/article.aspx?id=522
Thanks for choosing Syncfusion products.
Regards,
Guru Patwal
Syncfusion, Inc.