本文介绍了使WPF应用程序全屏显示(封面开始菜单)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使我的WPF应用程序全屏显示.现在,开始菜单阻止它覆盖所有内容,并转移我的应用程序.这是我的MainWindow.xaml代码所拥有的:

I would like to make my WPF application fullscreen. Right now the start menu prevents it from covering everything and shifts my application up. This is what I have for my MainWindow.xaml code:

<Window x:Class="HTA.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    mc:Ignorable="d"
    WindowStyle="None" ResizeMode="NoResize"
    WindowStartupLocation="CenterScreen"
    Width="1024" Height="768">

推荐答案

您可能缺少 WindowState ="Maximized" ,请尝试以下操作:

You're probably missing the WindowState="Maximized", try the following:

<Window x:Class="HTA.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525"
    WindowStyle="None" ResizeMode="NoResize"
    WindowStartupLocation="CenterScreen" WindowState="Maximized">

这篇关于使WPF应用程序全屏显示(封面开始菜单)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 06:47