wpf之windows设置WindowStyle为None
程序员文章站
2022-03-07 20:05:08
...
设置无窗口边框:
AllowsTransparency="True"
设置窗口可以拖动
增加事件:
处理方法如下:
private void Window_Loaded(object sender, RoutedEventArgs e)
{
this.MouseDown += delegate { DragMove(); };
}
设置可以改变大小
<WindowChrome.WindowChrome>
<WindowChrome GlassFrameThickness="0" ResizeBorderThickness="4" CaptionHeight="0" CornerRadius="0" />
</WindowChrome.WindowChrome>