Adding a UserControl in RadStatusStrip

4 posts, 0 answers
  1. Xavier
    Xavier avatar
    6 posts
    Member since:
    Feb 2016

    Posted 30 Mar Link to this post

    Hi all,

     

    I created a data navigation bar as a user control and I need to add it in a RadStatusStrip.

    I know how to do this with the basic StatusStrip using ToolStripControlHost, but I don't know if it's doable and didn't find any way to make the same thing with the telerik version.

    Also, I'd like to avoid putting the RadStatusStrip directly into a user control as it may have a different content depending on the form used.

    Any help on how to achieve this would be appreciable.

    Using  : VS2013 C#

    Best regards

  2. Dimitar
    Admin
    Dimitar avatar
    1411 posts

    Posted 30 Mar Link to this post

    Hello Xavier,

    Thank you for writing.

    You can use RadHostItem to add the custom control. For example:
    RadButton button = new RadButton() { Text = "test" };
    RadHostItem host = new RadHostItem(button);
    host.MinSize = new System.Drawing.Size(50, 20);
    radStatusStrip1.Items.Add(host);

    Let me know if you have additional questions.

    Regards,
    Dimitar
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Xavier
    Xavier avatar
    6 posts
    Member since:
    Feb 2016

    Posted 30 Mar Link to this post

    Thanks it's working !
    Now, I wonder if it's possible to make the User Control available in the RadStatusStrip's items list in the designer ?

     

    Regards,


  5. Dimitar
    Admin
    Dimitar avatar
    1411 posts

    Posted 31 Mar Link to this post

    Hello Xavier,

    Thank you for writing back.

    There is no way to add the host item at design-time. In this case, you have to configure this in the code behind.

    Please let me know if there is something else I can help you with. 
     
    Regards,
    Dimitar
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top