UI animation is getting paused when i start an exe in background in c# wpf

By Satish R

On login button click in login page am doing as follow

 PleaseWait _loadingWindow = new PleaseWait();
 _loadingWindow.Show();
 SecurityService _securityService = new SecurityService();
 if (_securityService.IsValidLogin(Username, pwdText))
 {
     _loadingWindow.Close();
     ChangeDataContext();
 }
 else
 {
    _loadingWindow.Close();
    MessageBox.Show("The Username and Password didn't match");
 }

In IsValidLogin am running a exe which will communicate with server and verify the login details and return value(True/False) accordingly. But when i execute the below line

if (_securityService.IsValidLogin(Username, pwdText))

a gif in Pleasewait window will get paused. How to avoid this problem should i use thread or task.

Thanks in advance

Source: Stack Overflow

    

Share it with your friends!

    Fatal error: Uncaught Exception: 12: REST API is deprecated for versions v2.1 and higher (12) thrown in /home/content/19/9652219/html/wp-content/plugins/seo-facebook-comments/facebook/base_facebook.php on line 1273