Friday, May 2, 2014

Inbuilt Dialogue for Win Application+WPF C#


To Show above progress dialogue in Windows WPF Application, you need to install MahApps.Metro theme then include

   using MahApps.Metro.Controls;
   using MahApps.Metro.Controls.Dialogs;

Also declare a global variable

                  private ProgressDialogController progress;

After this just call this below method to show or hide the progress dialogue

                  public async Task enableOrDisableWaitPopup(bool enable, string message="")
        {
            if(enable)
                progress = await this.ShowProgressAsync("Please wait...", message);
            else
                await progress.CloseAsync();
        }



1 comment: