I'm writing a WPF application which will monitor a feed. When there are new items determined from the feed I want to spawn off small windows as a notification. If anyone's familiar with Growl on OS X, that kind of what I'm trying to do. Also, I'll point out that this is my first WPF application (and the first time I've done something that's not a web app for a while!).
I was originally do code like this:
foreach(var feedNotification in newFeedNotifications) {
var popupWindow = new PopupWindow() { ... };
popupWindow.Show();
}
The problem is that the above is very CPU intensive, the the point where it's taking about 50% CPU usage. Also, I want to be able to track the position of the on-screen notifications so that if the next check finds more to show it knows where the last currently visible one is and the new ones are shown below the others.
How would I go about achieving this while ensuring that the computer running the application is not being brought to a hault?
Edit: I'm using the .NET 3.5 SP1 framework