Is it possible to set the root folder?

Jan 13, 2014 at 6:21 PM
Is it possible to add a property "RootFolder" so that I can let File Explorer only shows things only in that folder and it's sub-folders?
Feb 21, 2014 at 1:08 PM

Sorry for late reply, you can change root folder by
setting ExplorerViewModel.RootModels property.

It's in IEntryModel so you have to parse one using

There are 4 Profiles available at this moment,
FileSystemInfo, DirectoryInfoEx, SkyDrive and

As my computer is offline right now, please check
the latest source for more info.

Joseph Leung
Feb 22, 2014 at 4:47 AM
thanks for the answer. I downloaded your latest source code and found I couldn't compile the FileExplorer3. The error message is below. I guess it's still in progress...

C:\Users...\Documents\Visual Studio 2012\Projects\Other\FileExplorer3\TestSkyDrive2\TestSkyDrive2.csproj : error : The project file could not be loaded. Could not find a part of the path 'C:\Users...\Documents\Visual Studio 2012\Projects\Other\FileExplorer3\TestSkyDrive2\TestSkyDrive2.csproj'.
C:\Users...\Documents\Visual Studio 2012\Projects\Other\FileExplorer3\TestSkyDrive2\TestSkyDrive2.csproj
Feb 23, 2014 at 8:23 AM

I forgot to remove the test project from the solution (FileExplorer3), please remove them from your Solution Explorer manually.

Joseph Leung
Mar 2, 2014 at 2:31 PM
Is there an easy example for how to use the FileExplorer3 lib?
I used the following code and it showed only an empty explorer.
<Window x:Class="MainWindow"
    Title="MainWindow" Height="350" Width="525"
        <vw:ExplorerView />     
Mar 2, 2014 at 3:38 PM
Edited Mar 2, 2014 at 3:54 PM

You have to setup an ExplorerViewModel (_explorer), e.g.
if (_profileEx == null) 
      _profileEx = new FileSystemInfoExProfile(_events, _windowManager);
//Desktop as root directory
var root = _profileEx.ParseAsync(System.IO.DirectoryInfoEx.DesktopDirectory.FullName).Result;
var viewModel = new ExplorerViewModel(_events, _windowManager, root, /* you can assign more root dir here */));
var view = new ExplorerView();
If you want to initialize ExplorerView directly, please check the code in MdiWindow.xaml.cs, use the Caliburn.Micro.Bind.SetModel(view, _explorer) method.

If you develop using Caliburn.Micro framework, you can use windowManager.ShowWindow(_explorer) method directly.

Joseph Leung