I am updating a label of a popup every 5 minutes and have based the code on this article.
public MyPopup()
{
var startTimeSpan = TimeSpan.Zero;
var periodTimeSpan = TimeSpan.FromMinutes(5);
var timer = new System.Threading.Timer((e) =>
{
UpdatePopupUI();
}, null, startTimeSpan, periodTimeSpan);
}
Everything works fine but when I get back to the main windows and open new windows (not a new instance of the popup) it seems that the thread get deleted. I get no error in the input windows. Any idea regarding what can be killing the thread? Is there a way that I can troubleshoot this?