private TaskDialogResult ShowCore() { TaskDialogResult result; try { // Populate control lists, based on current // contents - note we are somewhat late-bound // on our control lists, to support XAML scenarios. SortDialogControls(); // First, let's make sure it even makes // sense to try a show. ValidateCurrentDialogSettings(); // Create settings object for new dialog, // based on current state. NativeTaskDialogSettings settings = new NativeTaskDialogSettings(); ApplyCoreSettings(settings); ApplySupplementalSettings(settings); // Show the dialog. // NOTE: this is a BLOCKING call; the dialog proc callbacks // will be executed by the same thread as the // Show() call before the thread of execution // contines to the end of this method. nativeDialog = new NativeTaskDialog(settings, this); nativeDialog.NativeShow(); // Build and return dialog result to public API - leaving it // null after an exception is thrown is fine in this case result = ConstructDialogResult(nativeDialog); checkBoxChecked = result.CheckBoxChecked; } finally { CleanUp(); nativeDialog = null; } return(result); }
private TaskDialogResult ShowCore() { TaskDialogResult result; try { // Populate control lists, based on current // contents - note we are somewhat late-bound // on our control lists, to support XAML scenarios. SortDialogControls(); // First, let's make sure it even makes // sense to try a show. ValidateCurrentDialogSettings(); // Create settings object for new dialog, // based on current state. NativeTaskDialogSettings settings = new NativeTaskDialogSettings(); ApplyCoreSettings(settings); ApplySupplementalSettings(settings); // Show the dialog. // NOTE: this is a BLOCKING call; the dialog proc callbacks // will be executed by the same thread as the // Show() call before the thread of execution // contines to the end of this method. nativeDialog = new NativeTaskDialog(settings, this); nativeDialog.NativeShow(); // Build and return dialog result to public API - leaving it // null after an exception is thrown is fine in this case result = ConstructDialogResult(nativeDialog); footerCheckBoxChecked = nativeDialog.CheckBoxChecked; } finally { CleanUp(); nativeDialog = null; } return result; }