编程语言
首页 > 编程语言> > C# WPF 窗体最大化、最小化、还原、置顶

C# WPF 窗体最大化、最小化、还原、置顶

作者:互联网

Topmost属性控制窗口置顶,WindowState属性控制窗体最大化,最小化,还原等状态。

private void SetTopMost_Checked(object sender, RoutedEventArgs e)
{
    Topmost = SetTopMost.IsChecked is true;
}

private void btnMinsize_Click(object sender, RoutedEventArgs e)
{
    WindowState = WindowState.Minimized;
}

private void btnNormal_Click(object sender, RoutedEventArgs e)
{
    WindowState = WindowState.Normal;
}

private void btnMnsize_Click(object sender, RoutedEventArgs e)
{
    WindowState = WindowState.Maximized;
}

标签:sender,RoutedEventArgs,C#,void,object,private,WindowState,窗体,置顶
来源: https://www.cnblogs.com/huvjie/p/15534813.html