Partager via


IXRImageBrush::SetImageSource (Compact 2013)

3/28/2014

This method sets the image displayed by this image brush.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetImageSource(
    IXRImageSource* pImageSource
) = 0;

Parameters

  • pImageSource
    [in] Pointer to an IXRImageSource derived object that contains the image for this image brush to display.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The underlying IXRImageSource instance that represents the graphical image is usually an IXRBitmapImage, which is a derived class.

By passing an IXRImageSource object, you are setting the image source as a Universal Resource Identifier (URI). This method converts the string in the object as a URI and can later request a stream from that URI and return the image source object.

For more information about the types of images to supply to this brush, see IXRBitmapImage.

To create an undisplayed placeholder, you can specify an initial value in Microsoft Silverlight 3 XAML of "" (empty string) and then set the value in C++ code later.

.NET Framework Equivalent

System.Windows.Media.ImageBrush.ImageSource

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRImageBrush
IXRImageBrush::GetImageSource