void viewChartButton_Click(object sender, RoutedEventArgs e) { ViewChartWindow dlg = new ViewChartWindow(); dlg.Owner = this; dlg.Show(); }