Use “Deployment.Current.Dispatcher.BeginInvoke”.

sample:

Deployment.Current.Dispatcher.BeginInvoke(delegate()
{
        LoadingBar = Visibility.Collapsed;
});