views:

62

answers:

1

Here is the scenario. I am building a part of my desktop app up and I have a need to create a preview handler. I found plenty of examples on the web of a WPF Preview handler, but I wanted to go one step more than just that. Lets say we have multiple documents and I wished to compare them. So the ideal scenario would be able to see documents side by side in a collection. Sort of how BING does their image search. But the more documents I select in a list box, the more documents I can compare all at once. The second Ideal solution would be a tabbed interface. One tab for each document. Sort of like how internet browsers are doing it now. Understand?

So here is the question that I have been struggling with. I can get one preview to work in a window, but can’t get the second one to show up. This is all WPF code so maybe im doing something wrong, but can you preview more than one document in a window at a time? My thought is no, because the previewhandler needs a window handler to lock onto.

I would love small code sample since COM and handlers aren’t my sort of thing, but I can manage if you are just able to point me down the right track.

Here is the code I found for the WPF Handler. http://blogs.microsoft.co.il/blogs/tamir/archive/2008/04/18/using-vista-preview-handlers-in-wpf-application.aspx

+1  A: 

An idea:

This page describes how to host a Winforms Form (top level window) inside a Wpf window. I believe this should allow you to effectively host multiple forms on the same window

Maybe you can use a similar technique to host multiple Windows inside a Window. ... sounds hacky to me but it is an idea.

Patrick Klug
Thank you, that will do!!
Scott