The main toolbar of my application has a lot of buttons. What I would like to do is when I first run the application have all the buttons displayed on the "Add or Remove Buttons" menu but only a few of the buttons displayed on the actual Toolbar.
I found that I can use the SetUserVisibilityPreferenceInBar() method. However, calling this method will interfere with any customization.
Any suggestions would be very helpful.
ADAdministrator Syncfusion Team August 18, 2004 04:41 PM
Presently there is no direct API in the XPMenus framework to accomplish this. I have requested the folks at the development team for their inputs on this issue, and will update you as soon as possible. Thanks for choosing Syncfusion products.
ADAdministrator Syncfusion Team August 19, 2004 07:59 AM
You can now call SetUserVisibilityPreferenceInBar selectively in Form_Load as shown below :
// Is this a newer version compared to what was deserialized?
bool newerAppVersion = AppStateSerializer.GetSingleton().DeserializedInfoApplicationVersion != Application.ProductVersion;
if(// This is the first time the app is being run
// Or if this is a newer version of the app.
// Go ahead and set the custom setting.
this.barManager1.SetUserVisibilityPreferenceInBar(this.openBarItem, this.bar2, false);
Note that DeserializedInfoApplicationVersion and IsUserCustomizationInfoPersisted are properties that have been just added and are still internal. They are expected to be incorporated in the next release of Essential Suite (post v184.108.40.206 releases). We appreciate your feedback, and thanks for choosing Syncfusion products.