private void btnMainData_Click(object sender, RoutedEventArgs e) { wMd = new WindowMainData(); this.Hide(); wMd.ShowDialog(); this.Show(); }