Alex Hope O'Connor
Alex Hope O'Connor

Reputation: 9684

FlowDocument Error After I Copied & Pasted The MSDN Example Code

I am trying to write a reporting module for my application, the application itself is written in WPF and after doing some research I have discovered that FlowDocument's are a very flexible format for generating reports. One point the really captured my interest is that someone with .NET Framework installed can view a generated FlowDocument in their browser.

So I created a document "Test.xaml" with the following code:

<FlowDocument
  xmlns=’http://schemas.microsoft.com/winfx/2006/xaml/presentation’
  xmlns:x=’http://schemas.microsoft.com/winfx/2006/xaml’>
  <Paragraph>The quick <Bold>brown fox</Bold> jumps over the lazy dog.
</Paragraph>
</FlowDocument>

I then opened the file in IE9 but received the message "An error occurred in the application..."

Can someone please explain why I am receiving this error?

Upvotes: 1

Views: 181

Answers (1)

Mark Hall
Mark Hall

Reputation: 54532

As far as the error you are getting, I got it too when I copied and pasted the MSDN example code. The single and double quotes are wrong, if you change them it will work.

<FlowDocument
    xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
    xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
    <Paragraph>The quick <Bold>brown fox</Bold> jumps over the lazy dog.</Paragraph>
</FlowDocument>

Upvotes: 1

Related Questions