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

Adding a UserControl in RadStatusStrip

3 Answers 117 Views
StatusStrip
This is a migrated thread and some comments may be shown as answers.
Xavier
Top achievements
Rank 1
Xavier asked on 30 Mar 2016, 08:24 AM

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

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 30 Mar 2016, 01:00 PM
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.
0
Xavier
Top achievements
Rank 1
answered on 30 Mar 2016, 01:37 PM

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,


0
Dimitar
Telerik team
answered on 31 Mar 2016, 11:17 AM
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.
Tags
StatusStrip
Asked by
Xavier
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Xavier
Top achievements
Rank 1
Share this question
or