Showing code?

May 29, 2009 at 11:38 AM

For a talk that I am giving, I am trying to figure out a simple way to display some c# code in a FlowDocument on a WPF page.   I started with a simple method with an if statement or two.  The code in the word document was in Courier New, and it was using spaces instead of tabs, and it looked purty.  I then viewed it in the XAML preview, and it didnt look any where near the same.  Same thing when I exported it to XAML and put it into a WPF app's <FlowDocumentReader>.

It didnt come out too good.  <grin>

Do you guys have any suggestions for settings or techniques to get a some simple c# into a word document and then into a <FlowDocument> ?  I have built a WPF app to do my presentations with and want to show code in the text that I am using for the talk.   I would prefer not to hand code the markup.  And I would prefer to use Word to create some of the slides that I need to do. 

Any suggestions?

Thanks

Pmont

Coordinator
Jun 2, 2009 at 9:10 PM

Can you please post a sample file in the Issue Tracker section?