1
我需要在一段文字旁邊加入圖片。不過,我需要在之後插入圖片已添加文字。 我知道我可以這樣做:將圖片插入內聯段落的列表
Paragraph firstParagraph = new Paragraph();
firstParagraph.Inlines.Add(new System.Windows.Controls.Image());
firstParagraph.Inlines.Add(new Run("Some text"));
它工作正常。
但是,如果我似乎無法做到這一點:
Paragraph secondParagraph = new Paragraph();
secondParagraph.Inlines.Add(new Run("Some text"));
secondParagraph.Inlines.InsertBefore(secondParagraph.Inlines.FirstInline, new Image());
(顯然,上面是一個人爲的例子,在我的現實世界的例子,我得到段一長串回來,在我無法控制,我需要在某些圖片的前面插入圖片。)
爲什麼不能這樣做這個?有錯誤嗎?它不起作用嗎? – Dennis 2012-04-20 14:21:09
是的,請詳細說明 – TheZenker 2012-04-24 15:31:09