views:

946

answers:

3

I'm porting an application from WPF to Silverlight and was saddened to read of the lack of FlowDocument support.

What is the best way in Silverlight then to display text with markup?

I just need the basics, e.g.

  • bold
  • italic
  • hyperlink
  • colors
  • font sizes

Added:

I don't mean a RichTextBox (as in the Vectorlight demo) but a way to format text on the application surface itself, like I can do with FlowDocument in WPF:

alt text

+3  A: 

In Silverlight 3 Vectorlight's Free RichTextBox can do a pretty good job of what you need using HTML.

In Silverlight 4 you have the option of using the RichTextBox to represent your content.

AnthonyWJones
Note that RichTextArea was renamed to RichTextBox in SL4 RC
Timores
@Timores: Beta 2 has both, has the RichTextArea been dropped from the RC (I haven't got round to downloading it as yet)?
AnthonyWJones
@Timores: Looking at the Docs it looks like it has.
AnthonyWJones
I'm checking out the RichTextArea control in Silverlight 4, that looks promising: http://blogs.msdn.com/silverlight_sdk/archive/2009/12/03/have-you-checked-out-the-new-richtextarea-control.aspx
Edward Tanguay
@Anthony, the breaking changes description mentions that RichTextArea is now called RichTextBox. See the end of http://msdn.microsoft.com/en-us/library/cc645049(VS.96).aspx
Timores
@Edward, I think that Anthony's answer is correct. The RichTextBox control accepts Paragraph content (like FlowDocument) and can be made read-only
Timores
+1  A: 

If you do get something like that up and running, msg me and maybe we can collaborate on bringing my "BindableFlowDocument" into the world of Silverlight. ;)

edit - wow, I must have gotten mixed up - my original answer was way off

JerKimball
+1  A: 

Just use the RichTextBox in Silverlight 4.0

WinnerWinnerChickenDinner