如何从窗口中删除标题栏但保留边框 [英] How to remove the title bar from a window but keep the border
本文介绍了如何从窗口中删除标题栏但保留边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试在 XAML 中设置 WindowStyle="None"
但这使窗口完全无边框.我需要一个没有标题栏的窗口,这会阻止用户移动它.但仍然有边框,所以它看起来仍然像一个窗口 :)
I tried setting WindowStyle="None"
in XAML but that makes the Window completely borderless. I need a Window that does not have a title bar, which prevent user from moving it. But still has border so it still looks like a Window :)
推荐答案
WindowStyle="None"
默认不移除边框,必须允许调整大小 (ResizeMode
= CanResize
/CanResizeWithGrip
) 并禁止透明(AllowsTransparency="False"
),但据我所知.
WindowStyle="None"
does not remove the border by default, you must allow resizing (ResizeMode
= CanResize
/ CanResizeWithGrip
) and forbid transparency (AllowsTransparency="False"
) though as far as i know.
这篇关于如何从窗口中删除标题栏但保留边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文