Windows Dev Center

ITextRange.InsertImage method

Inserts an image into this range.

Syntax


void InsertImage(
  int width, 
  int height, 
  int ascent, 
  VerticalCharacterAlignment verticalAlign, 
  string alternateText, 
  IRandomAccessStream value
)

Parameters

width

Type: System.Int32 [.NET] | int32 [C++]

The width of the image, in Device-independent pixels (DIPs).

height

Type: System.Int32 [.NET] | int32 [C++]

The height of the image, in DIPs.

ascent

Type: System.Int32 [.NET] | int32 [C++]

If verticalAlign is Baseline, this parameter is the distance, in DIPs, that the top of the image extends above the text baseline. If verticalAlign is Baseline and ascent is zero, the bottom of the image is placed at the text baseline.

verticalAlign

Type: VerticalCharacterAlignment

The vertical alignment of the image.

alternateText

Type: System.String [.NET] | Platform::String [C++]

The alternate text for the image.

value

Type: IRandomAccessStream

The stream that contains the image data.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Text
Windows::UI::Text [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Text
Windows::UI::Text [C++]

Metadata

Windows.winmd

See also

ITextRange

 

 

Show:
© 2015 Microsoft