1
我正在創建一個文本編輯器,並在裏面使用RichTextBox
和FlowDocument
。如何讓文字環繞Image
對象,類似於MS Word中的正方形佈局。目前我所能做的就是讓圖像與文字內嵌,這在圖像很大時會產生很大的差距。以下是我目前使用的代碼:FlowDocument中的文本像MS Word的方形佈局
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);
我需要更改多行文本以環繞圖像嗎?
很好,謝謝。下次我有機會試試這個。 – annonymously 2012-08-21 21:59:37