【发布时间】:2014-10-20 12:44:05
【问题描述】:
如何在文本段落中放置图像,以使图像与 XAML 中的文本内联?
这是我想要实现的 HTML 等价物:
<p>Your collection of things does not contain any items. Add a new
item by pressing <img src="add.png"> button and choosing the
options that you like lorem ipsum etc.</p>
我可以在 Grid 中放置一个 TextBlock 和一个 Image 并使用边距定位图像,但这非常脆弱,因为每次容器的文本大小、文本长度或宽度发生变化时,都必须手动重新定位图像。最好让图像与文本一起流动,就像上面的 HTML 示例一样。
【问题讨论】:
标签: xaml windows-phone