Partager via


IXRWriteableBitmap::Init(IXRUIElement, IXRTransform, bool) (Compact 2013)

3/28/2014

This method initializes a new instance of IXRWriteableBitmap by using a UI element and, optionally, a visual transformation.

Syntax

virtual HRESULT STDMETHODCALLTYPE Init(
    IXRUIElement* pUIElement,
    IXRTransform* pTransform,
    bool UseBackBuffer
) = 0;

Parameters

  • pUIElement
    [in] Pointer to the IXRUIElement-derived type to render within this bitmap.
  • pTransform
    [in] Optional. Pointer to the IXRTransform-derived type to apply to the UI element before it is rendered within this bitmap.
  • UseBackBuffer
    [in] Indicates whether to use a back-buffer surface for pixels in this bitmap.

Return Value

Returns an HRESULT that indicates success or failure. This method can also return the following error:

Error

Description

XR_E_INVALIDSTATE

The Init method was previously called on the IXRWriteableBitmap instance.

Remarks

The pUIElement parameter to Init must point to a premeasured and prearranged element before any calls to Init. If the element is not premeasured or prearranged, a call to Init returns correctly but does not correctly initialize the new instance.

You can call the Init method only one time to initialize a writeable bitmap.

.NET Framework Equivalent

System.Windows.Media.Imaging.WriteableBitmap Constructor (UIElement, Transform)

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRWriteableBitmap::Init
IXRWriteableBitmap