KryptonTaskDialog Documentation
Complete documentation suite for the KryptonTaskDialog component.
Overview
KryptonTaskDialog is a modern, flexible dialog component for the Krypton Toolkit that provides a composable approach to building dialogs through individual, configurable elements. Unlike traditional dialog systems, KryptonTaskDialog allows you to construct complex dialogs by showing/hiding and configuring only the elements you need.
Key Features
⨠Modular Design - Build dialogs using independent, composable elements
đ¨ Full Theme Integration - Seamlessly integrates with Krypton's theming engine
đ Reusable Forms - Show the same dialog instance multiple times
đ Auto-Sizing - Dialog height adjusts automatically based on visible elements
đ¯ Rich Content - Support for text, images, icons, buttons, controls, and custom layouts
⥠Modal & Modeless - Support for both blocking and non-blocking dialogs
Documentation Structure
đ Developer Documentation
Comprehensive guide for developers
Complete documentation covering:
- Overview and key features
- Architecture and design philosophy
- Getting started guide
- Core components and their properties
- All dialog elements with detailed explanations
- API reference
- Extensive usage examples
- Advanced features
- Theming and customization
- Best practices and patterns
- Troubleshooting guide
- Performance considerations
- Migration guide from other dialog systems
Best for: Learning the component from scratch, understanding all features
Size: ~150 pages
⥠Quick Reference Guide
Fast lookup and cheat sheet
Quick reference including:
- Quick start example
- Core concepts summary
- All element properties at a glance
- Common patterns (confirmations, progress dialogs, input dialogs)
- Theming quick reference
- Best practices checklist
- Common mistakes to avoid
- Handy cheat sheets
Best for: Quick lookups when you already know the basics
Size: ~20 pages
đī¸ Technical Architecture
Internal implementation details
Technical documentation covering:
- Class hierarchy and inheritance
- Design patterns used (Composite, Template Method, Observer, etc.)
- Component implementation details
- Layout system mechanics
- Event flow diagrams
- Theme integration internals
- Memory management and disposal patterns
- Guide to extending the component
- Performance optimization details
Best for: Understanding internals, extending the component, debugging
Size: ~50 pages
đ Complete API Reference
Exhaustive API documentation
Complete API reference including:
- All classes with inheritance chains
- All properties with types and descriptions
- All methods with signatures and parameters
- All events with signatures
- All enums with values
- Code examples for each member
- Complete working example at the end
Best for: Detailed API lookup, IntelliSense-style reference
Size: ~40 pages
Quick Navigation
By Task
I want to...
- Create my first dialog â Developer Documentation - Getting Started
- Find a specific property â API Reference
- See usage examples â Developer Documentation - Usage Examples
- Quickly look up syntax â Quick Reference Guide
- Understand how it works internally â Technical Architecture
- Extend the component â Technical Architecture - Extending
- Troubleshoot an issue â Developer Documentation - Troubleshooting
- Improve performance â Technical Architecture - Performance
- Migrate from MessageBox â Developer Documentation - Migration Guide
By Element
All elements are documented in detail in the Developer Documentation - Dialog Elements section:
- Heading - Title and icon
- Content - Main text with optional image
- Expander - Expandable detail section
- RichTextBox - Formatted text input/display
- FreeWheeler1 - FlowLayoutPanel for custom controls
- FreeWheeler2 - TableLayoutPanel for custom controls
- CommandLinkButtons - Command-style button collection
- CheckBox - Checkbox for user input
- ComboBox - Dropdown selection
- HyperLink - Clickable hyperlink
- ProgressBar - Progress indicator
- FooterBar - Common buttons and footer notes
Getting Started in 5 Minutes
1. Basic Dialog
using (KryptonTaskDialog taskDialog = new KryptonTaskDialog())
{
taskDialog.Dialog.Form.Text = "My Dialog";
taskDialog.Heading.Text = "Hello World";
taskDialog.Content.Text = "This is a simple dialog.";
taskDialog.FooterBar.CommonButtons.Buttons = KryptonTaskDialogCommonButtonTypes.OK;
taskDialog.ShowDialog();
}
2. Confirmation Dialog
using (var dlg = new KryptonTaskDialog())
{
dlg.Dialog.Form.Text = "Confirm";
dlg.Heading.Visible = true;
dlg.Heading.Text = "Delete File?";
dlg.Heading.IconType = KryptonTaskDialogIconType.ShieldWarning;
dlg.Content.Visible = true;
dlg.Content.Text = "This action cannot be undone.";
dlg.FooterBar.CommonButtons.Buttons =
KryptonTaskDialogCommonButtonTypes.Yes |
KryptonTaskDialogCommonButtonTypes.No;
return dlg.ShowDialog() == DialogResult.Yes;
}
3. Progress Dialog
var dlg = new KryptonTaskDialog();
dlg.Dialog.Form.Text = "Processing";
dlg.Heading.Visible = true;
dlg.Heading.Text = "Please Wait";
dlg.ProgresBar.Visible = true;
dlg.ProgresBar.ProgressBar.Maximum = 100;
dlg.Show(this);
// Update in loop or from background thread
dlg.ProgresBar.ProgressBar.Value = 50;
dlg.CloseDialog();
dlg.Dispose();
đ For more examples, see Developer Documentation - Usage Examples
Common Use Cases
User Interactions
- â Confirmation dialogs (Yes/No/Cancel)
- âšī¸ Information messages with detailed content
- â ī¸ Warning dialogs with expandable details
- â Error dialogs with exception details
- đ Input dialogs with text boxes, combo boxes, etc.
- đ Command selection using command link buttons
Progress & Status
- âŗ Progress indicators for long operations
- đ Status updates during processing
- đ Multi-step wizard-like flows
- âī¸ Settings/configuration dialogs
Advanced Scenarios
- đī¸ Custom control layouts using FreeWheeler
- đ Rich text display and editing
- đ Hyperlink navigation
- âī¸ Checkbox agreements (e.g., "Don't show again")
- đ¨ Fully themed dialogs matching application style
Design Philosophy
KryptonTaskDialog follows these design principles:
- Composition over Configuration - Build dialogs by composing elements rather than passing configuration objects
- Progressive Disclosure - Show only what's needed, hide everything else
- Reusability - Single dialog instance can be shown multiple times
- Theme Integration - Automatic synchronization with Krypton themes
- Lazy Evaluation - Layout calculations deferred until needed
- Type Safety - Strongly-typed API with IntelliSense support
Requirements
- .NET Framework: 4.7.2 or higher
- .NET: 8.0, 9.0, or 10.0 (Windows)
- Krypton Toolkit: v100.x.x or higher
- Platform: Windows
Element Overview
Visual Layout (Top to Bottom)
ââââââââââââââââââââââââââââââââââââââ
â Heading (Icon + Title) â
ââââââââââââââââââââââââââââââââââââââ¤
â Content (Text + Optional Image) â
ââââââââââââââââââââââââââââââââââââââ¤
â Expander (Expandable Details) â â Toggled by FooterBar
ââââââââââââââââââââââââââââââââââââââ¤
â RichTextBox â
ââââââââââââââââââââââââââââââââââââââ¤
â FreeWheeler1 (FlowLayoutPanel) â
ââââââââââââââââââââââââââââââââââââââ¤
â FreeWheeler2 (TableLayoutPanel) â
ââââââââââââââââââââââââââââââââââââââ¤
â CommandLinkButtons â
ââââââââââââââââââââââââââââââââââââââ¤
â CheckBox â
ââââââââââââââââââââââââââââââââââââââ¤
â ComboBox â
ââââââââââââââââââââââââââââââââââââââ¤
â HyperLink â
ââââââââââââââââââââââââââââââââââââââ¤
â ProgressBar â
ââââââââââââââââââââââââââââââââââââââ¤
â FooterBar (Buttons + Notes) â
ââââââââââââââââââââââââââââââââââââââ
All elements are optional and can be shown/hidden independently.
Best Practices Summary
â Do
- Always dispose dialogs using
usingstatements - Use modal (
ShowDialog) for decisions requiring immediate input - Use modeless (
Show) for progress indicators and status updates - Set
AcceptButtonandCancelButtonfor better keyboard navigation - Hide elements you don't need with
element.Visible = false - Reuse dialog instances when showing multiple times
- Use
Invoke()when updating modeless dialogs from background threads
â Don't
- Don't forget to dispose dialogs
- Don't update modeless dialogs from background threads without
Invoke() - Don't show dialogs without making at least one element visible
- Don't use
ShowDialog()for long-running operations (use modelessShow()instead) - Don't ignore theme integration - let the component use theme colors
đ Full best practices guide: Developer Documentation - Best Practices
Code Examples Repository
Simple Examples
Comprehensive Examples
All in Developer Documentation - Usage Examples:
- Simple Confirmation Dialog
- Progress Dialog (Modeless)
- Input Dialog with ComboBox
- Command Link Dialog
- Expandable Details Dialog
- Custom Controls with FreeWheeler
Troubleshooting
Common Issues
Dialog not displaying?
- Ensure at least one element has
Visible = true - Check
StartPositionis valid - Verify parent owner window is valid
Elements not visible?
- Check element's
Visibleproperty - Ensure you haven't called
HideAllElements()without re-showing elements
Cross-thread exceptions?
- Use
Invoke()when updating from background threads:this.Invoke(() => taskDialog.Content.Text = "Update");
Theme not applied?
- Ensure
KryptonManager.CurrentGlobalPaletteis set before creating dialog - Theme changes are automatically detected during dialog lifetime
đ Complete troubleshooting guide: Developer Documentation - Troubleshooting
Contributing
This documentation covers the KryptonTaskDialog component of the Krypton Standard Toolkit. For contributing:
- Report issues on the GitHub repository
- Follow the repository guidelines in AGENTS.md
- Submit pull requests following the contribution guidelines
Additional Resources
Related Components
- KryptonMessageBox - Simple message box dialogs
- KryptonForm - Base form used by KryptonTaskDialog
- KryptonManager - Theme management
Quick Links
| Document | Purpose | Size |
|---|---|---|
| đ Developer Documentation | Complete guide | ~150 pages |
| ⥠Quick Reference | Fast lookup | ~20 pages |
| đī¸ Architecture | Internals | ~50 pages |
| đ API Reference | API docs | ~40 pages |
Welcome to KryptonTaskDialog! Start with the Getting Started section or try one of the Quick Examples above.
For questions or issues, please refer to the Krypton Toolkit Repository.