I have looked at the documentation at http://mahapps.com/controls/dialogs.html but I am still not sure how to use it. There is no documentation for ShowMetroDialogAsync().
You have to create the dialog as a control like this:
<metro:BaseMetroDialog x:Class="Example.Dialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:metro="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro"
Title="My new dialog">
<TextBlock Text="Example" />
</metro:BaseMetroDialog>
Then, from another MetroWindow, you can show the dialog with something like this:
var dialog = new Example.Dialog()
await this.ShowMetroDialogAsync(dialog);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With