Search code examples
wpfwindows-explorer

Embed Windows Explorer in WPF User Control


Is it possible to embed Windows Explorer into a WPF user control (or a Windows Forms user control that could then be shown in a WPF control using a WindowsFormsHost object)?

I'm aware I could write a user control that displays the contents of a directory and navigation buttons etc. but I want it to look EXACTLY like Windows Explorer, including Favourites, Libraries, Network etc. Windows explorer also looks different depending on the operating system being used and ideally I would like this to be reflected in my application too.

I've googled around and not had any luck. The closest I came was this: http://gong-shell.sourceforge.net/ but when I tried to implement it into a WPF control it started behaving very strangely and causing controls that were completely separate to it to stop working.

I could be wrong but given that we have the OpenFileDialog, SaveFileDialog and FolderBrowserDialog windows I would have thought there'd also be a control for viewing Windows Explorer.

Thanks in advance for any help


Solution

  • I dont see anything directly provide as a control but MS does give a walkthough information to create one using windows form http://msdn.microsoft.com/en-us/library/ms171645.aspx

    Once you create this as windows form control you can host it in WPF look at Walkthrough http://msdn.microsoft.com/en-us/library/ms751761.aspx

    But then the point is why mix two different different platform and make it more difficult for youself, instead create the Windows Explorer in WPF