2

In my Windows Store app, I have a RichTextColumns control containing a richtextblock that successfully loads its content from an HTML file. I can get it to show images if they are in the HTML file, but I need to:

a) Insert content (images) that are not in the HTML file to begin with (preferably from a database).

b) Have the images trigger events on press.

I'm trying to make an ebook reader that lets you create notes, which will be displayed inline in the text as icon representations.

So, how do I insert content into an existing RichTextBlock, and how do I make that content a working button?

Thanks for reading!

John Brink
  • 546
  • 2
  • 8
  • 23
  • I know now what to insert into a RichTextBlock, but how do I insert it? I can't find any way to make a new Block object and put text (or a Paragraph or a Run) into it. – John Brink Jun 11 '13 at 20:38

1 Answers1

0

You can use InlineUIContainer to insert images in RichTextBlock. Also you can handle events like PointerPressed and other events on Image. See this. Also button can be inserted with help of InlineUIContainer

Sachin S
  • 36
  • 1
  • 2
  • That looks promising! Now the next question is whether I should try inserting it into the HTML before processing, or into the XAML after processing. Do you know of a way to insert content into a block in a RichTextBlock instead of adding a new block? – John Brink Jun 07 '13 at 15:38