Ejemplo n.º 1
0
        public IViewAdaper <FolderNameDialog, FolderNameDialogResult> GetFolderNameDialog()
        {
            var viewModel = new FolderNameViewModel(this);
            var view      = new FolderNameDialog();

            view.DataContext = viewModel;

            AttachToParentWindow(view);
            return(new FolderNameDialogAdapter(view));
        }
        public override FolderNameDialogResult ShowDialog()
        {
            FolderNameViewModel viewModel = view.DataContext as FolderNameViewModel;
            bool?result = view.ShowDialog();

            return(new FolderNameDialogResult()
            {
                DialogOperationResult = result,
                FolderName = viewModel.FolderName
            });
        }