次の方法で共有


IXRBitmapSource::SetSource (Compact 2013)

3/28/2014

This method sets the graphics source file for an IXRBitmapSource object to an IWICBitmap.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetSource(
    __in IWICBitmap* pBitmap
) = 0;

Parameters

  • pBitmap
    [in] Pointer to an IWICBitmap object to use for this IXRBitmapSource object.

Return Value

Returns an HRESULT that indicates success or no success.

Remarks

Call IXRResourceManager::ResolveImageResource, IXRApplication::LoadImageFromResource, or IXRApplication::LoadImageFromFile to obtain an IWICBitmap object for this method.

When you call IXRBitmapSource::SetSource, this method will automatically set the size (PixelWidth and PixelHeight properties) of the IXRBitmapSource object based on the actual bitmap image.

.NET Framework Equivalent

System.Windows.Media.Imaging.BitmapSource.SetSource

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRBitmapSource
IXRBitmapImage
IXRApplication::AddResourceModule