共用方式為


RichEditTextRange.InsertImage 方法

定義

將影像插入此範圍。

public:
 virtual void InsertImage(int width, int height, int ascent, VerticalCharacterAlignment verticalAlign, Platform::String ^ alternateText, IRandomAccessStream ^ value) = InsertImage;
void InsertImage(int const& width, int const& height, int const& ascent, VerticalCharacterAlignment const& verticalAlign, winrt::hstring const& alternateText, IRandomAccessStream const& value);
public void InsertImage(int width, int height, int ascent, VerticalCharacterAlignment verticalAlign, string alternateText, IRandomAccessStream value);
function insertImage(width, height, ascent, verticalAlign, alternateText, value)
Public Sub InsertImage (width As Integer, height As Integer, ascent As Integer, verticalAlign As VerticalCharacterAlignment, alternateText As String, value As IRandomAccessStream)

參數

width
Int32

int

影像的寬度,以裝置無關的圖元 (DIP) 。

height
Int32

int

影像的高度,以 DIP 為單位。

ascent
Int32

int

如果 verticalAlignBaseline,則此參數是影像頂端延伸至文字基準上方的距離,以 DIP 為單位。 如果 verticalAlignBaseline ,而 ascent 為零,則影像底部會放在文字基準。

verticalAlign
VerticalCharacterAlignment

影像的垂直對齊方式。

alternateText
String

Platform::String

winrt::hstring

影像的替代文字。

value
IRandomAccessStream

包含影像資料的資料流程。

實作

M:Microsoft.UI.Text.ITextRange.InsertImage(System.Int32,System.Int32,System.Int32,Microsoft.UI.Text.VerticalCharacterAlignment,System.String,Windows.Storage.Streams.IRandomAccessStream) M:Microsoft.UI.Text.ITextRange.InsertImage(int,int,int,Microsoft.UI.Text.VerticalCharacterAlignment,Platform::String,Windows.Storage.Streams.IRandomAccessStream) M:Microsoft.UI.Text.ITextRange.InsertImage(int,int,int,Microsoft.UI.Text.VerticalCharacterAlignment,winrt::hstring,Windows.Storage.Streams.IRandomAccessStream)

適用於