We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Platform : WPF
|
Category : Flow Content

How do I load a FlowDocument XAML content from outside the application directory?

Let us say you have your application running in a folder called C:\MyApp. Then if you want to load a FlowDocumentContent.xaml from a folder called C:\Contentthen this is easily done by first defining a FlowDocumentReader in your app like so:

And load the xaml file as follows:

But if you have references to sub-folders in your document. For example, if you are referring to images under this folder C:\Content\Images, then those images wouldn’t be found by the parser because the parser is executing with the application directory context whereas the document contents are in a different directory. To make this work, you can force a context on the parser as follows:

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.