Images in UWP DOCX Editor

18 Aug 20261 minute to read

The SfRichTextBoxAdv allows you to insert images of various formats, including bitmap (.bmp), JPEG (.jpg, .jpeg), and PNG (.png). Metafile images (.wmf, .emf) are not supported.

Inserting an image

The following code example illustrates how to insert a picture into the SfRichTextBoxAdv document using the InsertPictureCommand UI command.

<Button Content="Insert Picture" Command="{Binding ElementName=richTextBoxAdv, Path=InsertPictureCommand}" />

Image resizer

SfRichTextBoxAdv also supports a built-in image resizer that lets you resize images in the document as you wish. The image resizer accepts both touch and mouse interactions.

SfRichTextBoxAdv image resizer with selection handles around an inserted image

Text wrapping style

Text wrapping refers to how images are positioned relative to the surrounding text in a document. Refer to the Text wrapping style page for more information about the text wrapping styles available in SfRichTextBoxAdv.

Positioning the image

Starting from v19.1.0.x, SfRichTextBoxAdv preserves the position properties of an image and displays the image based on those properties. It does not support modifying the position properties. An image positioned relative to the line or paragraph is automatically moved as the surrounding text is edited.

NOTE

At present, the image with text wrapping style In-Line with Text can only be dragged and dropped anywhere in the document.

See also