解决方案:直接上代码 <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>
WPF程序四周存在透明边框
最新推荐文章于 2024-02-16 21:38:44 发布