/// <summary> /// Show the dialog w/ appropriate hooks to change size and default view /// </summary> /// <param name="parent"></param> /// <returns></returns> public DialogResult ShowDialog(IWin32Window parent) { // show the dialog (customizations happen in the DialogCreated event handler) using (OpenFileDialogCreationListener creationListener = new OpenFileDialogCreationListener(parent) ) { // listen for creation of the dialog, when this happens we customize the // appearance and behavior of the dialog as desired creationListener.DialogCreated +=new EventHandler(creationListener_DialogCreated); // show the dialog and return the result return _openFileDialog.ShowDialog(parent) ; } }