So I have a simple RSS-reader, that has a feed that gets updated when the app is started. How can I add functionality that keeps the new unread items in a different color? I would like to make it visible for the user which posts are new since last time he/she opened the app.
Share
Presuming you have a model something like;
You’ll want to bind the
ForegroundColorof aTextBlockto yourIsUnreadproperty using aIValueConverterthat takes abooland returns aColor. So your XAML might look like;Don’t forget to add the
xmlns:convertersattribute to your Page’s tag.You’ll then want to implement your
IValueConverterto do the boolean to colour conversion;And obviously you’ll need to bind the listbox,
RSSItems, to a collection ofRSSItem. Eg.Hope that helps.