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

XPMenus - Add or Remove Buttons

Hi, 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. Thanks, Nik

2 Replies

AD Administrator Syncfusion Team August 18, 2004 09:41 PM UTC

Hi Nik, 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. Regards, Guru Patwal Syncfusion, Inc.


AD Administrator Syncfusion Team August 19, 2004 12:59 PM UTC

Hi Nik, 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 !this.barManager1.IsUserCustomizationInfoPersisted // Or if this is a newer version of the app. || newerAppVersion) { // 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 v2.1.0.9 releases). We appreciate your feedback, and thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Up arrow icon