Now that we have added a Kryptonized version of the MessageBox it seems reasonable to keep that theme going and add a Krypton version of the TaskDialog. For those not familiar with the TaskDialog it’s a feature added with Windows Vista and is essentially a MessageBox on steroids.
I would however point out that our Krypton version is not intended as an exact copy. It is very similar but it might not contain absolutely everything that is possible with the operating system version of the dialog. However, something is better than nothing and so here is what we have.
Basic Settings
The most basic settings allow for a window title, main instructions, content details, associated icon and the specification of dialog buttons. You can omit any of these values in which case they will not be displayed. Here is an example of the dialog when they have all been specified with simple values…

CheckBox Settings
You can optionally define a CheckBox that is presented in the same area as the dialog buttons. You can define the text for the control as well as the initial checked state. This is more useful than it might first appear. A common scenario is to present warning messages to the user, but ff the user finds these annoying the checkbox could be checked to indicate that the warnings should be suppressed in the future. Or maybe the checkbox is used to indicate that the selected option should always be used in the future without the need to ask again.

Footer Settings
Additional information can be shown to the user in the footer area of the dialog. You can set an image, footer text and hyperlink text for this area or any combination of the three values. This is very useful if you want to allow additional help documentation or webpages to be shown in response to a hyperlink being pressed.

Radio Button
Use the radio button feature to present a multiple choice to the user. A simple collection property is used to specify the list of possible options and the selected value is available as a property on the KryptonTaskDialog class when the dialog has been removed.

Command Settings
This is similar to the radio buttons except the choices are presented as a set of buttons. Each button is assigned a DialogResult value and so on return from the dialog being dismissed you can check the return DialogResult to see which command was selected by the user.

As an extreme example you could even specify all the possible features and show the following…

…although I am not sure your users would appreciate such a monstrosity!
September 8th, 2010 at 5:31 pm
Hi Phil,
wonderful work!
But after KryptonTaskDialog and KryptonMessageBox, why don’t you
add KryptonInputBox to compelete this task?
Sometimes I use this dialog with VB.net to get free user input
to do something.
bye
luca
September 8th, 2010 at 5:34 pm
This is great. Just what I thought about after I saw you MessageBox.
However I would have two feature requests:
1. The taskdialog has an option to display a “show/hide details” button wich expands/collapses the message area and displays some additional text.
This is very usefull for displaying simple error messages with some further details on demand.
2. What I miss from the original taskdialog is the ability to host some custom control inside the message area. So instead simple text you code show some grid or treeview to better display data.
What do you think about it?
Regards,
Sven
September 8th, 2010 at 10:10 pm
Very nice! Does it have the ability to add custom buttons? For example, I might want to have “Continue”, “Skip”, “Skip All” and “Cancel” buttons, instead of the usual “Yes, “No”, “Cancel” ones.
September 9th, 2010 at 4:44 am
Excellent.
September 9th, 2010 at 12:58 pm
Luca: I never heard of the InputBox, I will investigate this.
Sven: There is no plan currently on adding the expand/collapse feature or add a custom control to the client area. But this depends on feedback and demand for the features.
VV: Again, not current possible.
September 11th, 2010 at 12:14 am
Great. Thanx for this!
September 14th, 2010 at 2:22 am
Nice adittion to the toolkit! I would love to see a Windows 7 look and feel, maybe time to change the ‘System’ palette to the newest version of windows instead of the outdated Office 2003 look? Or a new Windows 7 palette? The default task dialog in Windows 7 looks much better than the Kryptonized version with default palette if I have to be honest, what do you think?
November 18th, 2010 at 6:53 pm
Like it, thanks ,-) Just wondering if it’s possible to change the captions of the CommonButtons, for e.g. ‘Cancel’ should read ‘Abbrechen’ in Germany? I’ve tried to use ExtraText with the CommandButtons to display some explanations what the single buttons do, seems to be limited to one line – wishline: let us place text below the buttons that can be a little bit longer, such as in the original Windows task dailog…