I have a button click event which will pop up a form. How do I check if an existing form is already present before creating one and showing it?
here is my code
private void Button_Click(object sender, RoutedEventArgs e) {
Wizard wizard = new Wizard();
if (wizard.IsVisible)
{
}
else
{
wizard.Show();
}
}
the code here does not work as a new pop up wizard (form) is created everytime i click on the button from another window.