MahApps/MahApps.Metro — pull request #1168 by Savvkin (2014-03-17 16:49:10+00:00)
Title: Independently control dialog show/hide animation

I find this useful to eliminate 1 sec exit delay after showing quit confirmation dialog:

![quitconfirmation](https://f.cloud.github.com/assets/740729/2438617/dfa85230-adf3-11e3-912c-1cb08d4d87c2.JPG)

Sample usage code for event:

- MainWindow.xaml
```XML

```

- MainWindow.xaml.cs
```C#
private bool _shutdown;

private async void MetroWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = !_shutdown;
if (_shutdown) return;

var mySettings = new MetroDialogSettings()
{
AffirmativeButtonText = "Quit",
NegativeButtonText = "Cancel",
AnimateShow = true,
AnimateHide = false
};

var result = await this.ShowMessageAsync("Quit application?",
"Sure you want to quit application?",
MessageDialogStyle.AffirmativeAndNegative, mySettings);

_shutdown = result == MessageDialogResult.Affirmative;

if (_shutdown)
Application.Current.Shutdown();
}
```