feat: always unregister event if possible.
This commit is contained in:
@@ -194,9 +194,9 @@ public class PopConfirm : ContentControl
|
|||||||
var canExecute = command.CanExecute(button.CommandParameter);
|
var canExecute = command.CanExecute(button.CommandParameter);
|
||||||
if (canExecute)
|
if (canExecute)
|
||||||
{
|
{
|
||||||
command.CanExecuteChanged -= OnCanExecuteChanged;
|
|
||||||
_popup?.SetValue(Popup.IsOpenProperty, false);
|
_popup?.SetValue(Popup.IsOpenProperty, false);
|
||||||
}
|
}
|
||||||
|
command.CanExecuteChanged -= OnCanExecuteChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
command.CanExecuteChanged += OnCanExecuteChanged;
|
command.CanExecuteChanged += OnCanExecuteChanged;
|
||||||
|
|||||||
Reference in New Issue
Block a user