WPF 窗口去除顶部边框(正宗无边框)
2024-10-19 00:28:41
最近在做一个大屏展示视频图片的项目,功能并不复杂,半天的工作量吧,一开始同事采用的Unity3D进行开发,但是里面要播放4K视频,Unity 的短板就是视频的播放了,今晚就要交付了,我一早就来公司,决定用WPF重新开发一版,各项功能都好了,唯独顶部总是显示一条白色的边,已经设置WindowStyle为None了也没用,幸得网上大神提供的资料,终于解决了这个小问题。
XAML内容如下:
<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>
最新文章
- css中的一些概念
- iOS平台使用陀螺仪传感器
- 第二个Sprint冲刺团队贡献分
- [原创]java WEB学习笔记59:Struts2学习之路---OGNL,值栈,读取对象栈中的对象的属性,读取 Context Map 里的对象的属性,调用字段和方法,数组,list,map
- 学习Linux第五天
- [Leetcode]50. Pow(x, n)
- linux环境下安装nginx步骤
- JAVA浮点数计算精度损失底层原理与解决方案
- Error: EACCES: permission denied, mkdir &#39;......node-sass/build&#39;错误解决方案
- 【出错记录】Tomcat非root用户启动无法拥有权限读写文件
- 矩阵游戏|ZJOI2007|BZOJ1059|codevs1433|luoguP1129|二分图匹配|匈牙利算法|Elena
- MyEclipse项目的jquery.js发生[Multiple markers at this line - Missing semicolon]的解决方案
- ceph kubernetes中使用
- ArcGIS中的坐标系统定义与投影转换方法
- ios中tableview网封装(viewcontroller封装)常用的
- hive 分区表
- Spring Security构建Rest服务-1401-权限表达式
- python—第三库的安装方法
- S5PV210定时器
- windows 7 64bit安装apche php