Telerik blogs

Last week we got an interesting request from a customer of ours – he wanted to add several RadCharts in the RadRotator control and to implement custom slideshow. The idea was so appealing that I decided to shoot a quick blog about it. We already have similar image slideshows and I must say it is a pretty cool way to give your WinForms app a modern style and appeal:
http://www.telerik.com/community/code-library/submission/b311D-bdhadm.aspx

RotatorWithImages

Even though it is very easy to add RadChart directly to the rotator (by using RadHostItem), RadRotator performs much better with images and/or other windowless RadItems. This is why the more suitable approach here would be to convert the charts into images and then to add these in the rotator wrapped in RadImageItems. This way the slideshow can also take advantage of the slide animation features of the RadRotator control.

So, you have the charts in place. Here is the code that would create the images and insert them in the rotator:

RadChart myChart = ChartCreator.Create(i); //create charts
myChart.Size = this.radRotator1.Size;
Image chartAsImage = myChart.GetBitmap();
RadImageItem imageItem = new RadImageItem();
imageItem.Image = chartAsImage;
this.radRotator1.Items.Add(imageItem);

 

Easy and cool! Here are some screenshots of the sample app:

RotatorWithCharts0 RotatorWithCharts1 RotatorWithCharts2

Download the application from here.

 

I hope this is good food for thoughts on the impressive features that you can add to your apps using RadControls for WinForms.

Let us know if you have interesting ideas on how we can improve the UI of your application. We can surely cook something up for you J


About the Author

Nikolay Diyanov

Diyanov is the Product Manager of the Native Mobile UI division at Progress. Delivering outstanding solutions that make developers' lives easier is his passion and the biggest reward in his work. In his spare time, Nikolay enjoys travelling around the world, hiking, sun-bathing and kite-surfing.

Find him on Twitter @n_diyanov or on LinkedIn.

Related Posts

Comments

Comments are disabled in preview mode.