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

RadColorBox in CommandBar

2 Answers 117 Views
CommandBar
This is a migrated thread and some comments may be shown as answers.
LIMA Factory
Top achievements
Rank 1
LIMA Factory asked on 13 Apr 2016, 11:39 AM

Hello,

I would like to display a RadColorBox inside a RadCommandBar. This would allow the user to select a color and to show him which color is currently selected.

Is this possible?

A DateTimePicker can be easily hosted inside the command bar inside a CommandBarHostItem. But I can get it to work with a RadColorBox

Thank You for Your help

Regards,

Ingo

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 14 Apr 2016, 05:41 AM
Hello Ingo,

Thank you for writing.

You can find below a sample code snippet demonstrating how to add a RadColorBox:
CommandBarHostItem host = new CommandBarHostItem();
host.MinSize = new System.Drawing.Size(100, 20);
RadColorBox colorBox = new RadColorBox();
host.HostedControl = colorBox;
this.commandBarStripElement1.Items.Add(host);

I hope this information helps. Should you have further questions I would be glad to help.

 Regards,
Dess
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
LIMA Factory
Top achievements
Rank 1
answered on 14 Apr 2016, 06:02 AM

Hello,

Thank You for Your answer!

This works perfectly!

Regards

Ingo

Tags
CommandBar
Asked by
LIMA Factory
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
LIMA Factory
Top achievements
Rank 1
Share this question
or