public OpenFileBrowserParams LoadParams(object parameter)
        {
            OpenFileBrowserParams useBrowserParams = DefaultParams != null?DefaultParams.Value.Copy() : OpenFileBrowserParams.Default();

            if (parameter is OpenFileBrowserParams browseParams)
            {
                if (!String.IsNullOrEmpty(browseParams.StartDirectory))
                {
                    useBrowserParams.StartDirectory = browseParams.StartDirectory;
                }
                if (!String.IsNullOrEmpty(browseParams.DefaultFilename))
                {
                    useBrowserParams.DefaultFilename = browseParams.DefaultFilename;
                }
                if (!String.IsNullOrEmpty(browseParams.Title))
                {
                    useBrowserParams.Title = browseParams.Title;
                }
                if (browseParams.ParentWindow != null && browseParams.ParentWindow.IsVisible)
                {
                    useBrowserParams.ParentWindow = browseParams.ParentWindow;
                }
                useBrowserParams.UseFolderBrowser = browseParams.UseFolderBrowser;
                if (browseParams.Filters != null)
                {
                    useBrowserParams.Filters = browseParams.Filters;
                }
            }

            return(useBrowserParams);
        }
        public override void Execute(object parameter)
        {
            OpenFileBrowserParams browserParams = LoadParams(parameter);

            BrowserOpen = true;

            Log.Here().Activity("Starting at path: " + browserParams.StartDirectory);

            if (!browserParams.UseFolderBrowser)
            {
                if (MultiCallback == null)
                {
                    FileCommands.Load.OpenFileDialog(browserParams.ParentWindow, browserParams.Title, browserParams.StartDirectory, OnFileSelected,
                                                     browserParams.DefaultFilename, OnCanceled, browserParams.Filters);
                }
                else
                {
                    FileCommands.Load.OpenMultiFileDialog(browserParams.ParentWindow, browserParams.Title, browserParams.StartDirectory,
                                                          OnMultipleFilesSelected, browserParams.DefaultFilename, OnCanceled, browserParams.Filters);
                }
            }
            else
            {
                FileCommands.Load.OpenFolderDialog(browserParams.ParentWindow, browserParams.Title, browserParams.StartDirectory, OnFileSelected);
            }
        }