资 源 简 介
Viaual C# 使用wpf方法实现最大化和最小化窗口,和默认的方式似乎有些不同.有兴趣的可参考以下代码:
private void button1_Click(object sender, RoutedEventArgs e)
{//最大化显示窗口
this.WindowState = System.Windows.WindowState.Maximized;
}
private void button2_Click(object sender, RoutedEventArgs e)
{//最小化显示窗口
this.WindowState = System.Windows.WindowState.Minimized;
}
private void button3_Click(object sender, RoutedEventArgs e)
{//还原窗口
this.WindowState = System.Windows.WindowState.Normal;
}
private void button4_Click(object sender, RoutedEventArgs e)
{//关闭窗口
this.Close();
}