I have a button called “Verify”. When clicked it should change its content to “Verifying…” and once processing is completed it should show “Verified”. How should we achieve this? I am new to wpf. Any help will be appreciated.
private void btnVerify_Click(object sender, RoutedEventArgs e)
{
btnVerify.Content = new BitmapImage(new Uri("Verifying.png", UriKind.Relative));
VerifyData(); // this takes almost few seconds to few minutes
btnVerify.Content = new BitmapImage(new Uri("Verified.png", UriKind.Relative));
}
because you’re new to WPF, i’m assuming you’re NOT using MVVM. in that case:
hook onto the
Clickevent and in the method: