Answered by:
Inserting Images into Textblocks

Question
-
The installed help with Blend 3 suggests that Images can be inserted into the text flow of a Textblock in Silverlight 3. How do I do it, or is it a WPF only feature?
Tuesday, February 23, 2010 8:43 AM
Answers
-
You cannot insert Images into TextBlocks because the TextBlock uses the Text property to render its content. In Silverlight 4 (Beta), you can add Images to the RichTextArea block.
Tuesday, February 23, 2010 10:48 AM -
Hi Annwvyn,
As FuryDiamond said, you cannot insert images into a TextBlock, but you can put your TextBlocks around the Image, please check this article:
http://blogs.silverlight.net/blogs/jesseliberty/archive/2008/12/03/the-wrap-panel.aspx
Wednesday, February 24, 2010 10:00 PM -
Hi,
Yes you cannot have images as the child of texblock. Texblock only has - Text as the property.
However you can have the wrap panel, it come along with silverlight toolkit. If you seein Expression Blend, under user guide. It will show wrap- panel for WPF only. Som don't get confused.
Cheers,
Thursday, February 25, 2010 2:30 AM
All replies
-
You cannot insert Images into TextBlocks because the TextBlock uses the Text property to render its content. In Silverlight 4 (Beta), you can add Images to the RichTextArea block.
Tuesday, February 23, 2010 10:48 AM -
Hi Annwvyn,
As FuryDiamond said, you cannot insert images into a TextBlock, but you can put your TextBlocks around the Image, please check this article:
http://blogs.silverlight.net/blogs/jesseliberty/archive/2008/12/03/the-wrap-panel.aspx
Wednesday, February 24, 2010 10:00 PM -
Hi,
Yes you cannot have images as the child of texblock. Texblock only has - Text as the property.
However you can have the wrap panel, it come along with silverlight toolkit. If you seein Expression Blend, under user guide. It will show wrap- panel for WPF only. Som don't get confused.
Cheers,
Thursday, February 25, 2010 2:30 AM