Design-Time, add UserControl in a RadToolStripItem

6 posts, 0 answers
  1. hon
    hon avatar
    9 posts
    Member since:
    Sep 2010

    Posted 08 Sep 2010 Link to this post

    Hi
    I want to add UserControl in a RadToolStripItem. Not when the coding.



    Thanks
  2. hon
    hon avatar
    9 posts
    Member since:
    Sep 2010

    Posted 08 Sep 2010 Link to this post

    As shown in figure
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 08 Oct 2010 Link to this post

    Hi, 

    This wouldn't be possible. The main reason is that RadToolStripItems accepts only items of type RadItem. If you make a user control, then it would no longer be a RadItem. 
    Best regards, 
    Richard
  5. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 08 Oct 2010 Link to this post

    Hello Hon,

    There might be a way using RadHostItem, you could check out this similar KB Article that shows how to add controls to a Ribbon Bar.

    The usage of RadHostItem is very simple and intuitive:
    var button = new RadButton();
    var hostItem = new RadHostItem(button);
    radToolStripItem1.Items.Add(hostItem);

    But i have to warn you, you might have to do some tests and tweaks before you will get the size and everything right.

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga
  6. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 09 Oct 2010 Link to this post

    Hi again,

    There is a forum post here about adding a different control to a ToolStripItem, but as Emanuel said, you will probably have some issues with sizing. However, as far as I'm aware, there is a replacement for the Toolstrip on its way for Q3,

    Hope that helps
    Richard
  7. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 13 Oct 2010 Link to this post

    Hello hon, 

    Thank you for writing.

    Indeed, the way to place a user control in RadTooStrip is to first put it in a RadHostItem. However, since RadToolStrip is using our old layout system, some sizing issues might be expected.

    I want to confirm Richard's statement regarding the new control that we are currently developing - RadCommandBar. This control will be introduced in Q3 2010 and it will substitute the current toolstrip implementation.

    Kind regards,
    Stefan
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for WinForms is Visual Studio 2017 Ready