What is the best substitute for FlowDocument in Si

2019-01-28 01:45发布

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 http://www.deviantsart.com/upload/qna172.png

4条回答
The star\"
2楼-- · 2019-01-28 02:15

Inline with the comments of SL4 RC's RichTextBox (RichTextArea, circa SL4 Beta), and with your example of importing marked up text, the SL4 RC RichTextBox will allow for an import of XAML formatted text - like string richText = MyRichContent.Xaml; on this page: http://timheuer.com/blog/#richtextbox. Details are listed here: http://msdn.microsoft.com/en-us/library/system.windows.controls.richtextbox.xaml(VS.96).aspx.

查看更多
ら.Afraid
3楼-- · 2019-01-28 02:21

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.

查看更多
趁早两清
4楼-- · 2019-01-28 02:21

Just use the RichTextBox in Silverlight 4.0

查看更多
男人必须洒脱
5楼-- · 2019-01-28 02:24

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

查看更多
登录 后发表回答