diff --git a/src/Avalonia.Controls/Chrome/CaptionButtons.cs b/src/Avalonia.Controls/Chrome/CaptionButtons.cs index 99db4e550b..58f5b09c0d 100644 --- a/src/Avalonia.Controls/Chrome/CaptionButtons.cs +++ b/src/Avalonia.Controls/Chrome/CaptionButtons.cs @@ -54,10 +54,10 @@ namespace Avalonia.Controls.Chrome var minimiseButton = e.NameScope.Find("PART_MinimiseButton"); var fullScreenButton = e.NameScope.Find("PART_FullScreenButton"); - closeButton.PointerPressed += (sender, e) => _hostWindow.Close(); - restoreButton.PointerPressed += (sender, e) => _hostWindow.WindowState = _hostWindow.WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized; - minimiseButton.PointerPressed += (sender, e) => _hostWindow.WindowState = WindowState.Minimized; - fullScreenButton.PointerPressed += (sender, e) => _hostWindow.WindowState = _hostWindow.WindowState == WindowState.FullScreen ? WindowState.Normal : WindowState.FullScreen; + closeButton.PointerReleased += (sender, e) => _hostWindow.Close(); + restoreButton.PointerReleased += (sender, e) => _hostWindow.WindowState = _hostWindow.WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized; + minimiseButton.PointerReleased += (sender, e) => _hostWindow.WindowState = WindowState.Minimized; + fullScreenButton.PointerReleased += (sender, e) => _hostWindow.WindowState = _hostWindow.WindowState == WindowState.FullScreen ? WindowState.Normal : WindowState.FullScreen; } } }