Hosting Windows Shell Explorer in my WPF App

前端 未结 4 1669
独厮守ぢ
独厮守ぢ 2020-12-29 14:44

Is it possible to embed the Windows Explorer file/folder browser view in a WPF or a WinForms window?

I basically want to host the file/folder browser as part of my a

4条回答
  •  死守一世寂寞
    2020-12-29 15:21

    Windows Vista’s Shell introduced a new control which implements the IExplorerBrowser interface; this is the recommended method of hosting a Windows Shell filesystem view within your application. Developers building applications using .NET can use the wrapped version of the ExplorerBrowser control available in the Windows API CodePack for .NET.

    Please note that this interface is only available on Windows Vista and later. If your application needs to run on earlier Windows versions, you will need to fallback to the old WebOC implementation on those platforms.

    http://msdn.microsoft.com/en-us/library/bb761909(VS.85).aspx http://code.msdn.microsoft.com/WindowsAPICodePack

    This is recommended over hosting the web browser control due to a Win7 issue described here: http://blogs.msdn.com/ieinternals/archive/2009/12/30/Windows-7-Web-Browser-Control-will-not-browse-file-system.aspx

提交回复
热议问题