Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I create Mahapps custom dialog message with this code. the problem is the dialog form not show close button so cant close it. how to show close button ?

C#
public async void button_Click(object sender, RoutedEventArgs e)    

  {      Button btn = (Button) sender;
        //dialog.Resources["CustomDialogTest"];
        string[] id =  btn.Name.ToString().Split('_');

        this.MetroDialogOptions.ColorScheme = MetroDialogColorScheme.Accented;
        var dialog = (BaseMetroDialog)this.Resources["CustomDialogTest"];

        var mySettings = new MetroDialogSettings()
        {
            AffirmativeButtonText = "OK",
            AnimateShow = true,
            NegativeButtonText = "Go away!",
            FirstAuxiliaryButtonText = "Cancel",               
        };
         await this.ShowMetroDialogAsync(dialog);
         // this for close the dialog -> await this.HideMetroDialogAsync(dialog);           
    }
Posted
Comments
sameer549 18-Nov-14 0:06am    
i suggest you its better to ask a question in github, you will get quick solution.. https://github.com/MahApps/mahapps.github.com
Member 11665167 5-May-15 4:45am    
See the blog
http://www.c-sharpcorner.com/Blogs/48620/wpf-mahapps-custom-login.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900