WPF程序四周存在透明边框

来源:互联网 发布:大数据真实性 编辑:程序博客网 时间:2024/05/16 16:19
解决方案:直接上代码<Window x:Class="WPF_VideoPlayer.MainWindow"        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"        xmlns:local="clr-namespace:WPF_VideoPlayer"        mc:Ignorable="d"        Title="MainWindow" Height="350" Width="2880" Loaded="Window_Loaded" WindowChrome.WindowChrome="{DynamicResource WindowChromeKey}" AllowsTransparency="True" WindowStyle="None" ResizeMode="NoResize" WindowState="Maximized" Topmost="True" Background="Black">    <Window.Resources>        <WindowChrome x:Key="WindowChromeKey">            <WindowChrome.ResizeBorderThickness>                <Thickness>0</Thickness>            </WindowChrome.ResizeBorderThickness>        </WindowChrome>    </Window.Resources>    <Grid>    </Grid></Window>
原创粉丝点击