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

Custom toolbar in user control

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?

3 Replies

VM Venugopal M Syncfusion Team 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 :
websamples.syncfusion.com/samples/Tools.Windows/XPToolBarInUserControl/main.htm

Please let me know if you have any questions .

Thanks,
Venugopal M.


ST Sameer Tupe 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?

Thanks,


VM Venugopal M Syncfusion Team 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.

http://www.syncfusion.com/support/features/tools/Default.aspx?ToDo=view&questId=1549


Let me know if you have any queries.

Thank you for interest in Syncfusion Products.

Regards,
Venugopal M

Loader.
Live Chat Icon For mobile
Up arrow icon