Image in UWP RichTextBox (SfRichTextBoxAdv)

28 Jun 20211 minute to read

The SfRichTextBoxAdv allows you to insert images of various formats such as bitmap images (.bmp), JPEG (.jpg, .jpeg), PNG (.png) except Metafile images.
The following code example illustrates how to insert picture into the SfRichTextBoxAdv document through UI Command.

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

Image Resizer

The SfRichTextBoxAdv also supports built-in image resizer to resize the images present in the document to your wish. The image resizer accepts both touch and mouse interactions.
Image_img1

Text wrapping style

Text wrapping refers to how images are fit with surrounding text in a document. Please refer to this page for more information about text wrapping styles available in Word documents.

Positioning the image

Starting from v19.1.0.x, RichTextBox preserves the position properties of the image and displays the image based on position properties. It does not support modifying the position properties. Whereas the image will be automatically moved along with text edited if it is positioned relative to the line or paragraph.

NOTE

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