C#: How to kill a singleton window
Posted
by Anonymous Coward
on Stack Overflow
See other posts from Stack Overflow
or by Anonymous Coward
Published on 2010-03-16T09:21:30Z
Indexed on
2010/03/16
9:26 UTC
Read the original article
Hit count: 197
Hi Everyone
I'm working on a WPF application which should be utilizable with two monitors. In the main window is a button which detaches a part of the content in a second window wich can then be used on the other minitor. That second window I implemented as a singleton. That works quite good except that the second window doesn't get destoryed on application shutdown which means that the app keeps running in the background.
Regarding that problem I'd like to know if a singleton is the right way to do this and if not what would be the right way. If it is, how do I get rid of the instance and why can't I access the singleton instance from app.xaml.cs?
Thanks for your help.
© Stack Overflow or respective owner