📜  单击在 wpf 中打开另一个窗口的按钮后关闭主窗口 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:47.761000             🧑  作者: Mango

代码示例1
public partial class MainWindow : Window
{
    public MainWindow() 
    {
        InitializeComponent();
    }
    private void Button_Click(object sender, RoutedEventArgs e) 
    {
        Window1 win1 = new Window1();
        win1.Show();
        this.Close();
    }
}