0

I'm experimenting with a FlowDocument object but can't seem to get it work...

I keep getting the following error and have no clue what I should add.

Error 5 The type or namespace name 'FlowDocument' could not be found (are you missing a using directive or an assembly reference?)

dthorpe
  • 35,318
  • 5
  • 75
  • 119
SnIpY
  • 662
  • 2
  • 10
  • 27

1 Answers1

3

Add a reference to PresentationFramework dll to your project.

Add using System.Windows.Documents to your source file.

Note that FlowDocument is not included in Silverlight.

dthorpe
  • 35,318
  • 5
  • 75
  • 119
  • Any idea how it can be added to a silverlight project :/? – SnIpY Dec 13 '11 at 18:26
  • Nope. I believe FlowDocument was cut from Silverlight in part to slim down the Silverlight deployment size but possibly also because core WPF features were cut from Silverlight that FlowDocument requires. Shop around for third party equivalents. Probably not a good use of your time to reimplement FlowDocument yourself. – dthorpe Dec 13 '11 at 18:32
  • 1
    First hit in Google for "Silverlight flowdocument" : http://www.olsonsoft.com/blogs/stefanolson/post/Introduction-to-FlowDocument-for-Silverlight.aspx – dthorpe Dec 13 '11 at 18:33
  • 1
    And this: http://stackoverflow.com/questions/2456728/what-is-the-best-substitute-for-flowdocument-in-silverlight – dthorpe Dec 13 '11 at 18:34