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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom toolbar in user control

Thread ID:





58108 Mar 19,2007 11:33 AM UTC Mar 27,2007 11:15 AM UTC WinForms 3
Tags: Tools
Administrator [Syncfusion]
Asked On March 19, 2007 11:33 AM UTC

Hi, I have a requirement in which I need
to put toolbar in a user control which
should have configurable (backcolor, style etc )buttons. As per my information...XPMenus toolbar does not support buttons (it needs baritems ) and Mainframebarmanager/commandbar needs host to be a form. Any suggestions about this?

Venugopal M [Syncfusion]
Replied On March 21, 2007 01:12 PM UTC

Hi Sam,
You can add XPToolBar in any user control and also you can add Buttons(or any controls) in XPToolBar using Controls.Add() method but not using Items.Add() method because this method will accept only BarItem type. This added controls will support all the operation such as changing background color of toolbar and its style, etc..

Here only the problem is control overlay will occur while adding buttons in tool bar using Controls.Add() method. We can solve these problem using positioning the buttons using X and Y coordinates.

You can get more idea from attached sample about this, in that I have created user control with gradient background. Then I have added the XPToolBar in my user control. And added XPToolBar contain two bar items with three buttons for changing background, foreground, style of XPToolbar. Its working fine.

However I have opened a future request for this overlay problem.

We will try our very best to address the same with high priority. Thanks for your patience.

You can get sample from here :

Please let me know if you have any questions .

Venugopal M.

Sameer Tupe
Replied On March 26, 2007 11:33 AM UTC

Thanks for your help...Can you please tell me
1) How can I track this request?
2) How can I add seperators when I use Controls.Add?


Venugopal M [Syncfusion]
Replied On March 27, 2007 11:15 AM UTC

Hi Sam,

We couldn't add separator in the XPToolBar using Controls.Add() method. Because Separator element is a VisualStyle type. We couldn't add visualstyle element in controls collection. As a workaround we can add label or panel with FixedSingle borderstyle instead of separator.

You could track progress of request using the link below.


Let me know if you have any queries.

Thank you for interest in Syncfusion Products.

Venugopal M


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon