I want to show the user how many seconds have passed since some event occurs. Conceptually, my view model has properties like this:
public DateTime Occurred
You could create a single DispatcherTimer statically for your view model, and then have all instances of that view model listen to the Tick event.
public class YourViewModel
{
private static readonly DispatcherTimer _timer;
static YourViewModel()
{
//create and configure timer here to tick every second
}
public YourViewModel()
{
_timer.Tick += (s, e) => OnPropertyChanged("SecondsSinceOccurence");
}
}