Merge pull request #299 from yangjieshao/main

修复 全屏后 窗口仍可拖拽的问题
This commit is contained in:
Dong Bin
2024-07-22 07:43:54 +08:00
committed by GitHub

View File

@@ -49,6 +49,11 @@ public class TitleBar: ContentControl
private void OnPointerPressed(object sender, PointerPressedEventArgs e) private void OnPointerPressed(object sender, PointerPressedEventArgs e)
{ {
if(_visualRoot is not null
&& _visualRoot.WindowState == WindowState.FullScreen)
{
return;
}
if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
{ {
if (e.ClickCount < 2) if (e.ClickCount < 2)
@@ -62,6 +67,11 @@ public class TitleBar: ContentControl
{ {
if (_visualRoot is not null) if (_visualRoot is not null)
{ {
if ( _visualRoot.WindowState == WindowState.FullScreen)
{
return;
}
if (_visualRoot.WindowState == WindowState.Maximized) if (_visualRoot.WindowState == WindowState.Maximized)
{ {
_visualRoot.WindowState = WindowState.Normal; _visualRoot.WindowState = WindowState.Normal;