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
close icon

User controls with XPToolBar

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

3 Replies

AD Administrator Syncfusion Team 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.


MC Mario Cadelli 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


AD Administrator Syncfusion Team 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.

Loader.
Live Chat Icon For mobile
Up arrow icon