public void ShowDialog() { if (FolderBrowserDialogService.ShowDialog()) { ResultPath = FolderBrowserDialogService.ResultPath; } }
public PrimaryFiles() { InitializeComponent(); if (!mvvmContextPrimaryFiles.IsDesignMode) { InitializeBindings(); mvvmContextPrimaryFiles.RegisterService( FolderBrowserDialogService.Create(FolderBrowserStyle.SkinnableWide)); MVVMContext.RegisterFlyoutMessageBoxService(); } }
void InitializeNavigation() { mvvmContext.RegisterService(DocumentManagerService.Create(tabFormControl)); mvvmContext.RegisterService(FolderBrowserDialogService.Create(this, new FolderBrowserDialogServiceOptions() { Description = "New Folder" })); // var fluent = mvvmContext.OfType <MainViewModel>(); fluent.BindCommand(tabFormControl.AddPageButton, x => x.NewFolder()); fluent.WithEvent(this, "Load") .EventToCommand(x => x.OnLoad()); fluent.WithEvent(this, "Closed") .EventToCommand(x => x.OnClosed()); }
public void OpenOrCreate(Folder folder) { if (folder.IsNew()) { if (FolderBrowserDialogService.ShowDialog()) { DataModel.OnNewFolder(FolderBrowserDialogService.ResultPath); } return; } IDocument document = DocumentManagerService.FindDocumentByIdOrCreate(folder.Path, svc => svc.CreateDocument("FolderView", folder, this.GetParentViewModel <MainViewModel>())); document.Id = folder.Path; document.Show(); DataModel.OnFolderOpen(folder); }