A small library to allow developer to create dialogs and show them within WPF ContentControls.
-
Inherits from
DialogBaseclass and use the XAML designer to create your dialog, then you can show it usingvoid DialogBase.ShowDialog(ContentControl parent = null)method if you do not need the dialog result, or you can use async/await pattern methodTask<DialogResult> DialogBase.ShowDialogAsync(Content parent = null)method. -
Create custom control (like
UserControl) and show it using one ofDialogHelper.ShowDialog()methods which return the actual dialog that will hold your control, or one ofDialogHelper.ShowDialogAsync()methods that use async/await pattern to return dialog result.
- Easy to use in new or current applications. If you already has
UserControlholding your interface you can directly show it usingDialogHelpermethods. - Theme color allows you to give a standard color to your dialog, which is very useful if you are using metro-like styles (
Mahapps.Metrofor example). - Customizable title bar and buttons. You can set a style or contents of your buttons (Ok, Cancel, Yes, No, And even the close button),
- You can also simulate the buttons action using built in commands in
DialogCommandsclass. - You can use animation for In/Out (Showing/Closing) of the dialog. Currently we provides three built in animations (Fade, Zoom, Zoom Center), or you can use your own animation.
- Customizable back ground effects. the default is to blur parent content with a dark overlay and a shadow under the dialog.
- Built in
MessageBoxfunctionality usingDialogHelper.ShowMessage, DialogHelper.ShowMessageAsyncmethods, with different theme color for each of (Info, Warning, Error , and Question messages). - You can set most of the dialog properties for all your dialogs in your
App.xamlfile using styles, or attached properties ofDialogParameters.
More details on wiki
- Adding some useful events and commands.
- Easier implantation for MVVM pattern.
Written with StackEdit.