private void Button_Click(object sender, RoutedEventArgs e) { myWindow newWindow = new myWindow(); var child = (TextBlock)newWindow.FindName("txtBlock"); MessageBox.Show(child.Text); }
public myClass() { var window = new myWindow(); window.Show(); ExitThread(); }