Won't Fix
Last Updated: 26 May 2020 15:27 by Petar

" Collection was modified; enumeration operation may not execute.'" - The exception is observed when the CLR exceptions are enabled from Visual Studio. 

Edit:

The Ellapsed event handler of the Timer is executed in background thread but modifying chart data in a background thread is considered bad practice which is not supported by our component. This is the reason we are declining this bug report.

General solution is to schedule the data update to happen on the UI thread with Dispatcher. When in ViewModel, the following code can be used:

        private void OnTimerElapsed(object sender, ElapsedEventArgs e)
        {
            ViewModelBase.InvokeOnUIThread(() =>
            {
                for (int i = 0; i < Items.Count; i++)
                {
                    Items[i].X += (_random.NextDouble() - 0.5) * 0.1;
                    Items[i].Y += (_random.NextDouble() - 0.5) * 0.1;
                }
            });
        }