This is a migrated thread and some comments may be shown as answers.

Non-Telerik Controls in radRibbonBar Group?

3 Answers 61 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 04 Feb 2016, 02:04 PM

Hello.  

My apologies if this has been answered elsewhere, but I was unable to find anything pertinent in my search. 

I'm in the process of evaluating UI for WinForms for use in an existing WinForms application, and have downloaded the demo. More specifically, I'm interested in the radRibbonBar control.  One of the first questions that has come up is whether or not it's possible to add a non-Telerik control to a ribbon bar group.  I've noticed that when I right-click on a group in order to add an item, I'm presented only with a list of rad controls, but seemingly there is no way to add other types of WinForms controls.   The issue is that our application utilizes a number of highly-customized controls that have been built off of the standard .NET base classes, a few of which would need to be included as part of the Ribbon Bar. 

 So, is the radRibbonBar control capable of hosting customized, non-Telerik controls?   If so, how?

Thanks.

 - Tom

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 04 Feb 2016, 03:22 PM
Hi Tom,

Thank you for writing.

To add custom controls you should use RadHostItem. For example:
ComboBox compbo = new ComboBox();
 
compbo.Items.Add("test item");
 
RadHostItem host = new RadHostItem(compbo);
host.MinSize = new Size(100, 0);
 
this.radRibbonBarGroup1.Items.Add(host);

Let me know if I can assist you further.
 
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Tom
Top achievements
Rank 1
answered on 04 Feb 2016, 03:57 PM
Thanks Dimitar, for the quick reply.  I took a look at your sample code and have now successfully added a non-Telerik control to a test form.   I do have one quick follow-up question though.   Am I correct in assuming that the RadHostItem is container item that's  added and managed solely via code-behind, and is *not* available for visual placement via the designer?
0
Dimitar
Telerik team
answered on 05 Feb 2016, 09:36 AM
Hi Tom,

Thank you for writing back.

Yes, you are right, the RadHostItem is not a component which can be used at design time. Please, note that the cases when this item is used are rare and most of the time it is used in custom elements which are added in the code behind.

Do not hesitate to contact us if you have other questions.
 
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
RibbonBar
Asked by
Tom
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Tom
Top achievements
Rank 1
Share this question
or