Share via


IXRImageBrush (Windows Embedded CE 6.0)

1/6/2010

This class paints an area with an image.

Syntax

class IXRImageBrush : public IXRTileBrush

Methods

Method Description

IXRImageBrush::AddImageFailedEventHandler

Attaches a delegate to the ImageFailed event for this image brush. When the ImageFailed event is raised by this image brush, this delegate will be invoked.

IXRImageBrush::GetImageSource

Retrieves the image displayed by this image brush.

IXRImageBrush::RemoveImageFailedEventHandler

Removes a delegate from the ImageFailed event for this image brush.

IXRImageBrush::SetImageSource

Sets the image displayed by this image brush.

Remarks

An IXRImageBrush object paints an area with an IXRImageSource object. In Silverlight for Windows Embedded, IXRImageSource is a base class for IXRBitmapImage, which describes a bitmap graphic.

An IXRImageBrush object is a type of IXRTileBrush that defines its content as an image. You can control how the image is stretched, aligned, and tiled, which enables you to produce patterns and other effects.

One use for an image brush is to create a decorative effect for text in your application. To create this effect, supply an image brush as the fill of the text by using the IXRTextBlock::SetBackground method or the IXRGlyphs::SetFill method.

If you attempt to set an image that is in an invalid format or is specified to a URI that cannot be resolved, then the ImageFailed event is raised. You can create an event handler for this event, and attach a delegate for that handler by using the IXRImageBrush::AddImageFailedEventHandler.

You can also define an image brush 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

    IXRBrush

        IXRTileBrush

            IXRImageBrush

.NET Framework Equivalent

System.Windows.Media.ImageBrush

Requirements

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

See Also

Reference

Classes for Visual Appearance and Behavior

Other Resources