private void DogsButton_Click(object sender, RoutedEventArgs e) { if (DogsWindow == null) { DogsWindow = new DogsWindow(this); DogsWindow.Show(); } }