I’m creating a text editor and using a RichTextBox with a FlowDocument inside. How does one go about making the text wrap around an Image object, similar to the square layout in MS Word. At the moment all I am able to get it to do is make the image inline with the text, which creates a big gap when the image is large. Here is the code I’m currently using:
Paragraph p = new Paragraph();
p.Inlines.Add("Hello");
BitmapImage bmp = new BitmapImage(new Uri("test.png", UriKind.Relative));
Image img = new Image();
img.Width = 50;
img.Height = 50;
img.Source = bmp;
p.Inlines.Add(img);
fld.Blocks.Add(p);
What do I need to change to make multiple lines of text wrap around the image?
Maybe use a Figure? The examples at the bottom show just what you said about lines of text “wrapped” around an image.