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

Help with Documentation and "Image"

2 Answers 58 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 2
Craig asked on 30 Nov 2014, 10:27 AM
In the documentation over at (http://www.telerik.com/help/wpf/carousel-getting-started.html) we find the following snippet at the bottom when discussing how to add images to the carousel.  I'm sure this looks fine to you but where/what is "Image"?


List<Image> myImages = new List<Image>();
Image myImage = new Image();
myImage.Source = new BitmapImage(new Uri("/Images/nature1.jpg", UriKind.Relative));
myImage.Height = 200;
myImage.Width = 200;
myImages.Add(myImage);

The only image I can find is System.Drawing.Image and that ain't it.  All that displays is a text block detailing the image's properties.  At least is displays something.

I have found vague references to this being a "UI Element" whatever that is.  I've been all over these forums, stackoverflow and the web in general, what am I missing here?

2 Answers, 1 is accepted

Sort by
0
Boris
Telerik team
answered on 01 Dec 2014, 11:59 AM
Hi Craig,

The Image class actually refers to System.Windows.Controls.Image and to use it you will need to add the following using:

using System.Windows.Controls;

I attached a sample project that demonstrates the approach from the "Display Images in RadCarousel" section of the Getting Started article.

On a side note for more information on what is an UI element you can check the UI Element Class msdn article.

I hope this helps.

Regards,
Boris
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Tony
Top achievements
Rank 1
answered on 31 Jan 2015, 12:56 AM
Boris your sample app was very helpful as I was searching for something similar to Craig's question. I seriously get aggravated with some of the document for these tools. There are many glaring oversights (assumptions) that leave me really confused.

Thanks again!

Tony
Tags
Carousel
Asked by
Craig
Top achievements
Rank 2
Answers by
Boris
Telerik team
Tony
Top achievements
Rank 1
Share this question
or