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;
}
上一篇:路由事件、鼠标键盘输入


下一篇:FastReport 金额大小写转换自定义函数