diff --git a/SukiUI.Demo/Features/ControlsLibrary/Toasts/ToastsView.axaml b/SukiUI.Demo/Features/ControlsLibrary/Toasts/ToastsView.axaml
index 25f16293a..d16ed4a0a 100644
--- a/SukiUI.Demo/Features/ControlsLibrary/Toasts/ToastsView.axaml
+++ b/SukiUI.Demo/Features/ControlsLibrary/Toasts/ToastsView.axaml
@@ -28,6 +28,7 @@
+
diff --git a/SukiUI.Demo/Features/ControlsLibrary/Toasts/ToastsViewModel.cs b/SukiUI.Demo/Features/ControlsLibrary/Toasts/ToastsViewModel.cs
index 57cfca973..371cf925c 100644
--- a/SukiUI.Demo/Features/ControlsLibrary/Toasts/ToastsViewModel.cs
+++ b/SukiUI.Demo/Features/ControlsLibrary/Toasts/ToastsViewModel.cs
@@ -107,4 +107,7 @@ void ShowCallbackToast()
[RelayCommand]
private void ShowToastWindow() => new ToastWindowDemo(toastManager).Show();
+
+ [RelayCommand]
+ private void DismissAllToasts() => toastManager.DismissAll();
}
\ No newline at end of file
diff --git a/SukiUI/Controls/Hosts/SukiToastHost.cs b/SukiUI/Controls/Hosts/SukiToastHost.cs
index c5b840f7c..05ccf6b3d 100644
--- a/SukiUI/Controls/Hosts/SukiToastHost.cs
+++ b/SukiUI/Controls/Hosts/SukiToastHost.cs
@@ -106,8 +106,11 @@ private void DetachManagerEvents(ISukiToastManager oldManager)
private void ManagerOnToastDismissed(object sender, SukiToastManagerEventArgs args) =>
ClearToast(args.Toast);
- private void ManagerOnAllToastsDismissed(object sender, EventArgs e) =>
- Items.Clear();
+ private void ManagerOnAllToastsDismissed(object sender, EventArgs e)
+ {
+ foreach(var toast in Items)
+ ClearToast((ISukiToast)toast!);
+ }
private void ManagerOnToastQueued(object sender, SukiToastManagerEventArgs args)
{
@@ -120,7 +123,7 @@ private void ManagerOnToastQueued(object sender, SukiToastManagerEventArgs args)
private void ClearToast(ISukiToast toast)
{
- if (!Items.Contains(toast)) return;
+ if (Manager.IsDismissed(toast)) return;
toast.AnimateDismiss();
Task.Delay(300).ContinueWith(_ =>
{
diff --git a/SukiUI/Controls/SukiToast.axaml.cs b/SukiUI/Controls/SukiToast.axaml.cs
index ab81572b8..cf2c48482 100644
--- a/SukiUI/Controls/SukiToast.axaml.cs
+++ b/SukiUI/Controls/SukiToast.axaml.cs
@@ -59,6 +59,8 @@ public ObservableCollection