Windows Application Packaging Project create new instance everytime open a toast notification

nguyen tam 1 Reputation point
2021-09-18T14:37:54.723+00:00

Windows Application Packaging Project create new instance everytime I open a toast notification. That's not what I want. The second time the app open (from toast notification), this exception fires

System.InvalidOperationException: 'Cannot set Visibility or call Show, ShowDialog, or WindowInteropHelper.EnsureHandle after a Window has closed.'

How to allow only one instance?

Universal Windows Platform (UWP)
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,678 questions
{count} votes