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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

User controls with XPToolBar

Thread ID:





17541 Aug 11,2004 10:28 AM UTC Aug 16,2004 08:41 PM UTC WinForms 3
Tags: Tools
Mario Cadelli
Asked On August 11, 2004 10:28 AM UTC

Hi, I''m using a XPToolBar and I want to add in it a specific user control that I''ve created. That user control contains a label and a read-only edit box (like we have in a status bar) but we might also have user controls with buttons. Is it possible to drop a user control in a XPToolBar? If yes, I cannot find how to do that. If no, what would be the best solution to have in my toolbar normal buttons and status informations. Thanks Mario

Administrator [Syncfusion]
Replied On August 11, 2004 12:25 PM UTC

Hi Mario, I am afraid, an UserControl cannot be hosted inside a XPToolBar. Instead, you could use the CommandBars framework for this purpose. A CommandBar can host any Control in it, and the look and feel too is very similar to the XPMenus (since the XPMenus uses the CommandBar framework internally). Please refer to the test sample attached that illustrates this and let me know if this meets your requirements. We appreciate your interest in Syncfusion. Regards, Guru Patwal Syncfusion, Inc.

Mario Cadelli
Replied On August 16, 2004 06:23 AM UTC

Hi Guru, Thanks for the answer. I''m just back after a 4 days break, so I have checked the sample only today. I''m kind of stuck with the CommandBar ... I try to add buttons to it and cannot do that. Am I missing something? I''ve added a XPToolBar to the sample with 2 bar items and a parent bar item (with 4 children). Is it possible to explain how it''s possible to have those items in the Bar Command present in the form altogether with the user control already in it? Thanks Mario xptoolbar_usercontrol_3471.zip

Administrator [Syncfusion]
Replied On August 16, 2004 08:41 PM UTC

Hi Mario, Thanks for the modified sample. Please note that the XPToolBar can host BarItems only. It cannot host Controls/UserControls. Similarly, the CommandBar can host Controls/UserControls but cannot host BarItems. So I am afraid, it is not possible to have both the BarItems and the UserControls on one bar. You would need atleast 2 bars (one XPToolBar and one CommandBar) for this purpose. We appreciate your cooperation, and understanding on this issue. Regards, Guru Patwal Syncfusion, Inc.


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon