Non-Telerik Controls in radRibbonBar Group?

4 posts, 0 answers
  1. Tom
    Tom avatar
    2 posts
    Member since:
    Feb 2016

    Posted 04 Feb Link to this post

    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

  2. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 04 Feb Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Tom
    Tom avatar
    2 posts
    Member since:
    Feb 2016

    Posted 04 Feb in reply to Dimitar Link to this post

    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?
  5. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 05 Feb Link to this post

    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
Back to Top