public async Task<SignInDialogData> ShowLogin(string title, string message)
        {
            var dictionary = new ResourceDictionary();
            dictionary.Source = new Uri("pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Dialogs.xaml");

            SignInDialogSettings settings = new SignInDialogSettings();
            settings.NegativeButtonVisibility = Visibility.Visible;
            settings.UsernameWatermark = "Username";
            settings.PasswordWatermark = "Password";
            settings.CustomResourceDictionary = dictionary;
            settings.SuppressDefaultResources = true;

            SignInDialog dialog = new SignInDialog(this, settings)
            {
                Title = title,
                Message = message
            };

            await this.ShowMetroDialogAsync(dialog, settings);

            SignInDialogData data = await dialog.WaitForButtonPressAsync();

            await this.HideMetroDialogAsync(dialog, settings);

            return data;
        }
 internal SignInDialog(MetroWindow parentWindow, SignInDialogSettings settings)
     : base(parentWindow, settings)
 {
     InitializeComponent();
     Username = settings.InitialUsername;
     Password = settings.InitialPassword;
     UsernameWatermark = settings.UsernameWatermark;
     PasswordWatermark = settings.PasswordWatermark;
     NegativeButtonButtonVisibility = settings.NegativeButtonVisibility;
     ShouldHideUsername = settings.ShouldHideUsername;
     RememberCheckBoxVisibility = settings.RememberCheckBoxVisibility;
     RememberCheckBoxText = settings.RememberCheckBoxText;
 }