fix: pass default value when close from control.

This commit is contained in:
rabbitism
2024-01-23 00:30:24 +08:00
parent 611e2bc84e
commit 7c29320ad9
2 changed files with 2 additions and 2 deletions

View File

@@ -74,8 +74,9 @@ public class DialogControl: ContentControl
{
if (this.DataContext is IDialogContext context)
{
OnClose?.Invoke(this, args);
OnClose?.Invoke(this, Equals(sender, _closeButton) ? context.DefaultCloseResult : args);
}
else
{
OnClose?.Invoke(this, null);