From dc897f3a72c3155598090b0249417301b95eabc5 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Tue, 7 Jan 2020 22:50:41 +0800 Subject: [PATCH] Update Growl.cs --- src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs b/src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs index 6267a340..678dc5be 100644 --- a/src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs +++ b/src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs @@ -321,10 +321,8 @@ namespace HandyControl.Controls private void Update() { - if (ActionBeforeClose != null) + if (Type == InfoType.Ask) { - _staysOpen = true; - _showCloseButton = false; _panelMore.IsEnabled = true; _panelMore.Show(); } @@ -534,12 +532,12 @@ namespace HandyControl.Controls } break; case InfoType.Ask: + growlInfo.StaysOpen = true; + growlInfo.ShowCloseButton = false; if (!growlInfo.IsCustom) { growlInfo.IconKey = ResourceToken.AskGeometry; growlInfo.IconBrushKey = ResourceToken.AccentBrush; - growlInfo.StaysOpen = true; - growlInfo.ShowCloseButton = false; } else { @@ -805,7 +803,7 @@ namespace HandyControl.Controls { if (invokeActionBeforeClose) { - ActionBeforeClose?.Invoke(invokeParam); + if (ActionBeforeClose?.Invoke(invokeParam) == false) return; } _timerClose?.Stop();