This project is read-only.
Obsoluted: Replaced by ScriptCommandInitializer

A list of predefined ExplorerViewModelInitializer

ExplorerInitializer allow you to specify WindowManager, EventAggregator (from CaliburnMicro), RootModels (root directories), and allow you specify any number of ViewModelInitializer which is run when Explorer is loaded, whether it's in a window or a tab.

 var expInitializer = new ExplorerInitializer(windowManager, events, rootModels)
 expInitializer.AddRange(new IViewModelInitializer<IExplorerViewModel>[] {
    ExplorerInitializers.Parameter(new FileListParameters() { ViewMode = "Icon", ItemSize = 100 }),
    ExplorerInitializers.Parameter(new ExplorerParameters() { UIScale = 1.1f, FileListSize = "3*", NavigationSize = 45 }),
    new BasicParamInitalizers(_expandRootDirectories, _enableMultiSelect, _enableDrag, _enableDrop),
    new ColumnInitializers(),
    new ScriptCommandsInitializers(_windowManager, _events, profiles),
    new ToolbarCommandsInitializers(_windowManager)
});

  TabbedExplorerViewModel tabExp =  new TabbedExplorerViewModel(expInitializer); //For multi-tab
  ExplorerViewModel exp = new ExplorerViewModel(); //For single-window.
);


ViewModelInitializer have just one method : InitializeAsync().
   public interface IViewModelInitializer<VM>
    {
        Task InitalizeAsync(VM viewModel);
    }

Last edited Aug 21, 2014 at 7:22 PM by lycj, version 4

Comments

No comments yet.