You can use Timer with 2 minutes interval and MVVM with INotifyPropertyChanged and it'll check for updates after every two minutes and Property Changed will update the wpf UI for you automatically. Just a simple example can be like below
public class PersonViewModel : INotifyPropertyChanged
{
private string _name;
private Timer _timer;
public string Name
{
get { return _name; }
set
{
_name = value;
RaisePropertyChanged("Name");
}
}
public PersonViewModel()
{
_timer = new Timer(UpdateModel, null, 0, 2000);
}
private void UpdateModel(object state)
{
}
public event PropertyChangedEventHandler PropertyChanged;
private void RaisePropertyChanged(string property)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(property));
}
}
ObservableCollection is a good choice in MVVM if you're using any collections