在WPF中最小化黑色位置之后

时间:2016-10-04 06:30:35

标签: c# wpf xaml minimize

就像标题一样,我说我的程序最小化问题。

如果我最小化我的窗口,旧的地方将被设置为黑色并在刷新后隐藏。截图:

enter image description here

private void OnlyStatus_Click(object sender, RoutedEventArgs e)
    {
        if (_zählerStatus % 2 == 0)
        {
            ServerAdministratorWindow.MaxHeight = 690;
            ServerAdministratorWindow.MinHeight = 690;
            ServerAdministratorWindow.MaxWidth = 840;
            ServerAdministratorWindow.MinWidth = 840;
            ServerAdministratorWindow.Width = 840;
            ServerAdministratorWindow.Height = 690;
            _zählerStatus++;
        }
        else if (_zählerStatus % 2 != 0)
        {
            ServerAdministratorWindow.MaxHeight = 80;
            ServerAdministratorWindow.MinHeight = 80;
            ServerAdministratorWindow.MinWidth = 840;
            ServerAdministratorWindow.Height = 80;
            _zählerStatus++;
        }
    }

0 个答案:

没有答案