I am trying to use the PDFsharp library in an XNA game. The example code I am trying to get to work is:
static void Main()
{
Renderer renderer = new Renderer();
PreviewForm form = new PreviewForm();
form.RenderEvent = new PagePreview.RenderEvent(renderer.Render);
Application.Run(form);
}
But I don’t know how to get this to run in XNA.
Is it possible to pass the graphics that are passed to the winform to the XNA graphics engine instead?
update 2
It appears that the original links to MSDN have been broken, I can’t seem to find them on MSDN anymore, if someone does, please update the post. In the mean time you may want to check out this codeproject article — http://www.codeproject.com/Articles/21330/Easy-Rendering-with-XNA-Inside-a-Windows-Form
update after a quick check, looks like the first link at (See also: XNA and WinForms) is the same one I found.
I recommend you look into mixing winforms and XNA, try this: http://create.msdn.com/en-US/education/catalog/sample/winforms_series_1