Update Page( windows) during Button Click, Spinner stops working on WPF C#

Asked

Viewed 60 times

1

I’m making a WPF application in c#, that when I click the query button on the bank. It starts spinning a "Spinner" that is inside the Usercontrol;

 private void BtnBusca_Click(object sender, RoutedEventArgs e)
 {
    MessageControl.Visibility = Visibility.Visible;
    Dispatcher.Invoke(new Action(() => { }), DispatcherPriority.ContextIdle, null);
    FuncaoBuscabanco(TbCampoBusca.Text);
    MessageControl.Visibility = Visibility.Collapsed;
}

By clicking the Button, it will not stop running and continue to do my search in the database.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.