public MainPage() { InitializeComponent(); finIndexViewModel = new ViewModelFinIndex(); this.DataContext = finIndexViewModel; DispatcherTimer timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(1); timer.Tick += new EventHandler(timer_Tick); timer.Start(); }