Share via


IXRImage (Windows Embedded CE 6.0)

1/6/2010

This class represents a control that displays an image.

Syntax

class IXRImage : public IXRFrameworkElement

Methods

Method Description

IXRImage::AddImageFailedEventHandler

Attaches a delegate to the ImageFailed event for this image. When the image raises the ImageFailed event, this delegate will be invoked.

IXRImage::GetSource

Retrieves the source for this image.

IXRImage::GetStretch

Retrieves a value that describes how an image should be stretched to fill the destination rectangle.

IXRImage::RemoveImageFailedEventHandler

Removes a delegate from the ImageFailed event for this image.

IXRImage::SetSource

Sets the source for this image.

IXRImage::SetStretch

Sets a value that describes how an image should be stretched to fill the destination rectangle.

Remarks

If Height and Width are not set by calling the inherited methods IXRFrameworkElement::SetHeight and IXRFrameworkElement::SetWidth, IXRImage appears on-screen with the natural height and width of its source image file.

IXRImage potentially has asynchronous behavior. Until the source is resolved and the image sources decoded, the layout system will render the image object. However, the rendered image will be treated as an element that has 0 size if it did not specify Height and Width, or it will be treated as an empty region on the UI that has the specified size if Height and Width are specified. As soon as the universal resource identifier (URI) of the source of this image is resolved and the image source is decoded, another layout pass is initiated.

Silverlight for Windows Embedded uses bitmap caching. Therefore, if a requested image was requested at a previous time, the cached and decoded image is used again instead of starting a new request from the URI.

For information about the kinds of image sources and formats that can be used for an IXRImage control, see IXRBitmapImage.

You can also define an image in Microsoft Silverlight 2 XAML. For information about the differences between XAML in Silverlight for Windows Embedded and Silverlight 2, see Differences Between Silverlight for the Web and Silverlight for Windows Embedded. For more information about how to define this element in the source XAML for your application, see this Microsoft Web site.

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRImage

                

.NET Framework Equivalent

System.Windows.Controls.Image

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

Classes for UI Element Management

Other Resources