예제 #1
0
        public UserControl1()
        {
            InitializeComponent();
            DataContext   = new ProcViewModel();
            Grid.Sorting += Grid_Sorting;
            Timer timer = new Timer(5000);

            timer.Elapsed += Timer_Elapsed;
            timer.Start();
        }
예제 #2
0
 private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
 {
     Application.Current.Dispatcher.Invoke(new Action(() => { DataContext = new ProcViewModel(sortIndex); }));
     Debug.WriteLine("Timer!");
 }