void timerTest_Elapsed(object sender, ElapsedEventArgs e) { PopupNotificationModel model_test = new PopupNotificationModel() { SiteId = 1, SiteName = "test", SiteUri = "http://www.gmail.com/", TextDiff = "<br><br><br><br><br><br><p class='added'><a name='anchor'>+</a> added</p>" + "<br><br><br><br><p class='notchanged'>Not changed</p>" + "<br><br><br><br><p class='removed'>- removed</p>" + "<br><br><br><br><br><br><br><br><br>" }; Action del = () => { PopupNotificationUC notification = new PopupNotificationUC(model_test); _notifyIcon.ShowCustomBalloon(notification, PopupAnimation.Slide, null); }; _notifyIcon.Dispatcher.BeginInvoke(del); timerTest.Stop(); }
public PopupNotificationUC(PopupNotificationModel model) { Model = model; InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, OnBalloonClosing); }