Summary
The base class for dialogs.
You probably don't want to use this class, if you want to add arbitrary content to your dialog,
use the
CustomDialog
class.
- Namespace
- MahApps
.Metro .Controls .Dialogs - Base Types
-
- ContentControl
- Derived Types
graph BT
Type-->Base0["ContentControl"]
Type["BaseMetroDialog"]
class Type type-node
Derived0["InputDialog"]-->Type
click Derived0 "/api/MahApps.Metro.Controls.Dialogs/InputDialog"
Derived1["CustomDialog"]-->Type
click Derived1 "/api/MahApps.Metro.Controls.Dialogs/CustomDialog"
Derived2["LoginDialog"]-->Type
click Derived2 "/api/MahApps.Metro.Controls.Dialogs/LoginDialog"
Derived3["MessageDialog"]-->Type
click Derived3 "/api/MahApps.Metro.Controls.Dialogs/MessageDialog"
Derived4["ProgressDialog"]-->Type
click Derived4 "/api/MahApps.Metro.Controls.Dialogs/ProgressDialog"
Syntax
[TemplatePart(Name = PART_Top, Type = typeof(ContentPresenter))]
[TemplatePart(Name = PART_Content, Type = typeof(ContentPresenter))]
[TemplatePart(Name = PART_Bottom, Type = typeof(ContentPresenter))]
public abstract class BaseMetroDialog : ContentControl
Attributes
Type | Description |
---|---|
TemplatePart | |
TemplatePart | |
TemplatePart |
Constructors
Name | Summary |
---|---|
BaseMetroDialog |
Initializes a new BaseMetroDialog .
|
BaseMetroDialog |
Initializes a new BaseMetroDialog .
|
Fields
Name | Constant Value | Summary |
---|---|---|
DialogBottomProperty |
Identifies the
DialogBottom dependency property.static
|
|
Dialog |
Identifies the
DialogButtonFontSize dependency property.static
|
|
Dialog |
Identifies the
DialogContentMargin dependency property.static
|
|
Dialog |
Identifies the
DialogContentWidth dependency property.static
|
|
Dialog |
Identifies the
DialogMessageFontSize dependency property.static
|
|
Dialog |
Identifies the
DialogTitleFontSize dependency property.static
|
|
DialogTopProperty |
Identifies the
DialogTop dependency property.static
|
|
TitleProperty |
Identifies the
Title dependency property.static
|
Properties
Name | Value | Summary |
---|---|---|
DialogBottom | object |
Gets or sets the content below the dialog.
|
DialogButtonFontSize | double |
Gets or sets the font size of any dialog buttons.
|
DialogContentMargin | GridLength |
Gets or sets the left and right margin for the dialog content.
|
DialogContentWidth | GridLength |
Gets or sets the width for the dialog content.
|
Dialog |
double |
Gets or sets the font size of the dialog message text.
|
DialogSettings | MetroDialogSettings | |
DialogTitleFontSize | double |
Gets or sets the font size of the dialog title.
|
DialogTop | object |
Gets or sets the content above the dialog.
|
LogicalChildren | IEnumerator | |
Title | string |
Gets or sets the title of the dialog.
|
Methods
Name | Value | Summary |
---|---|---|
ConfigureSettings |
MetroDialogSettings |
With this method it's possible to return your own settings in a custom dialog.
|
On |
AutomationPeer | |
OnLoaded |
void |
This is called in the loaded event.
|
RequestCloseAsync |
Task |
Requests an externally shown Dialog to close. Will throw an exception if the Dialog is inside of a MetroWindow.
|
WaitForCloseAsync |
Task | |
WaitForLoadAsync |
Task |
Waits for the dialog to become ready for interaction.
|
Wait |
Task |
Waits until this dialog gets unloaded.
|
Extension Methods
Name | Value | Summary |
---|---|---|
ShowDialogExternally |
TDialog |
Create and show an external dialog.
From DialogManager
|
Show |
TDialog |
Create and show an external modal dialog.
From DialogManager
|