Example #1
0
 private void Timer_Elapsed(object sender, ElapsedEventArgs e)
 {
     if (My.Count > 27)
     {
         My.RemoveAt(0);
     }
     //if the amount of letters exceeding the limit then we deleting the first occurence '
     // regular case of using
     My.Add(new KeyValuePair <char, int>(MyValue.First().Key, MyValue.First().Value));// change to collection values
     MyValue.RemoveAt(0);
     series.Dispatcher.BeginInvoke(new Action(() => {
         series.ItemsSource = null;
         series.InvalidateVisual();
         series.ItemsSource = My;
         BetterThanAnyGraph.InvalidateVisual();
     }));
 }