tags:

views:

36

answers:

2

I currently have about 4-6 sentences that each come from different articles. They are displayed after each other in a TedxtBox that wraps the text. What I want to do is make the sentences interactive (hover/click) and also add a small icon at the end of the sentences with the same interaction. Each sentence should have individual events attached to it.

How would you recommend me doing this? I have seriously have no clue at all.
Thanks

+1  A: 

Maybe have a look at this article "Creating Actionlinks in a Silverlight RichTextBox": http://www.codeproject.com/KB/silverlight/InteractiveText.aspx

Florian Reischl
Thanks will check this out and comment back on how it worked.
WmasterJ
This was very cumbersome and I ended up not trying it out completly
WmasterJ
A: 

The issue with text not wrapping in the listbox is that the listbox, by design, does not restrict the size of its child objects; they can expand past the visible border of the box, at which time a scrollbar is displayed to enable the user to scroll across/down the list.

If, at the point that you create and populate the listbox, you set the Width of the child items (whether TextBox or TextBlock) to a known value (for instance, the width of the listbox minus any margin) and then set TextWrapping.Wrap as normal, your text will wrap as you expect.

LoneDeveloper
Yes but the they will not be inline with each other. Just imagine a paragraph of text with 7 sentences and no line-breaks. Then make each sentence a link or put link in the middle of the text. Thanks anyway :)
WmasterJ