We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

MainFrameBarManager menu persistance

Hello, I''m having a problem with displaying the main menu of my windows application. Users must add menu items to the menu bar each time (but really, I''d like to not allow the menu to be customizable). I have the following lines of code in my InitializeComponent method in my main form: this.mainFormBarManager.AutoPersistCustomization = true; this.mainFormBarManager.AutoLoadToolBarPositions = true; this.mainFormBarManager.BarPositionInfo = ((System.IO.MemoryStream).... //etc this.mainFormBarManager.ResetCustomization = false; I have tried building the application and removing the IsolatedStorage directory on the client machine before running the app, but the behaviour is always the same. The main menu bar is not there - or rather, it is there but no barItems are displayed. I get the feeling that viewing my main form in the Visual Studio designer mode and reseting the menu items might help, but I have a lot of other things going on in the form and I''d rather deal with things programatically. Any suggestions or ideas? Thanks in advance for your help.

3 Replies

AD Administrator Syncfusion Team October 24, 2004 07:32 PM UTC

Hi Mark, According to my understanding, you can see the main-menu Bar''s BarItems in designtime but not at runtime. You could try the following suggestions : 1. Disallow quick customization for the main-menu Bar using the code below : this,bar1.BarStyle |= BarStyle.AllowQucikCustomizing; 2. Now run the application, right click on the main menu to invoke the runtime customization dialog. Chose the Options tab, and press the "Reset Customization" button which should delete all the persisted customization related information. 3. Delete all the contents of the Isolated Storage folder. This can be accessed at C:\Documents and Settings\{user name}\Local Settings\Application Data\IsolatedStorage. Please let me know if this helps. We appreciate your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.


AD Administrator Syncfusion Team October 25, 2004 02:40 PM UTC

Hmm. Not quite. I''m actually not viewing the UI at designtime at all. The menus and toolbars are build build and added programatically in other areas of the code. The problem I''m having is that until a user has customized the menu bar and added parent menu items in, the user will never be able to see them. Through the BarStyle enums and MainFrameBarManager properties, I can make it so that the user can add (customize) the menu and have it persist, but the "default" for my menu bar seems to be "don''t show the menu items". I wonder if this is so because of the fact that I''m explicitly not using the designtime view of my UI and, perhaps, my form''s resx file has some old information in it that gets read in but I don''t have any way to change it because I don''t want to view the form in designtime. I don''t want to view the form at designtime because of the nature of my derived BarItems and programatic way of building them. >Hi Mark, > >According to my understanding, you can see the main-menu Bar''s BarItems in designtime but not at runtime. You could try the following suggestions : > >1. Disallow quick customization for the main-menu Bar using the code below : > >this,bar1.BarStyle |= BarStyle.AllowQucikCustomizing; > >2. Now run the application, right click on the main menu to invoke the runtime customization dialog. Chose the Options tab, and press the "Reset Customization" button which should delete all the persisted customization related information. > >3. Delete all the contents of the Isolated Storage folder. This can be accessed at C:\Documents and Settings\{user name}\Local Settings\Application Data\IsolatedStorage. > >Please let me know if this helps. We appreciate your interest in Syncfusion products. > >Regards, >Guru Patwal >Syncfusion, Inc.


AD Administrator Syncfusion Team October 27, 2004 12:02 PM UTC

Hi Mark, I have created a DirectTrac incident 14396 in this regard, and updated you there. In future, please address all your queries through DirectTrac as far as possible. We appreciate your cooperation, and thanks for your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon