public object CreateViewModel(System.Windows.DependencyObject sender)
        {
            var vm = new FilesViewModel();

            vm.ServiceLocator.RegisterService <Mediator>(MediatorFactory.GetCommonMediator());
            vm.ServiceLocator.RegisterService <IExplorer>(new Explorer());
            vm.Initialize();
            return(vm);
        }
Exemplo n.º 2
0
        public object CreateViewModel(System.Windows.DependencyObject sender)
        {
            //For this demo I did not create a design time model.

            var vm = new DirectoriesViewModel();

            vm.ServiceLocator.RegisterService <Mediator>(
                MediatorFactory.GetCommonMediator());
            vm.ServiceLocator.RegisterService <IExplorer>(
                new Explorer());
            vm.LoadData();
            return(vm);
        }