 <p>Try if this works Not tested, a wild guess</p> <pre><code>void restartButtonClickFunction(object obj) { foreach (var window in Application.Current.Windows) { if (window is GameWindow) { ((Window)window).Close(); } } GameWindow gamewindow = new GameWindow(); gamewindow.Show(); } </code></pre>