views:

32

answers:

2

Hello,

I need to host a FlowDocument inside a Window / Grid or in other words I don't want the Flowdocument to be the root element. Can somebody please help me how this can be done? I only found informations on how to host UIElements inside a FlowDocument, but not how to place the FlowDocument inside something else. Thanks for any hint!

+2  A: 

Use FlowDocumentViewer or it inheritors. If you need edit this document - use RichTextBox.

Eugene Cheverda
Thanks for your reply, also the hint on the RichTextBox was helpful :-)
stefan.at.wpf
A: 

The ViewModel sample application of the WPF Application Framework (WAF) shows how to host a FlowDocument inside a UserControl.

Please look for the EmailClient.Presentation\Views\ShellWindow\MessageContentView.xaml file.

jbe
Thanks for your reply, jbe. I ended up using a RichTextBox, but the WAF in general looks interesting :-)
stefan.at.wpf