I've tested it and it worked for me.
You might also try to give you the same result
Thanks
private void Button_Click(object sender, RoutedEventArgs e)
{
NewMain win=new NewMain();
win.Owner = this;
this.Visibility = Visibility.Hidden;
win.ShowDialog();
this.Close();
}