Exception thrown: 'System.InvalidOperationException' in WindowsBase.dll
问题 I'm having trouble having something update in my WPF UI. The same part of the code that's throwing the exception works just fine in the other function. Now, for some reason, I can't figure out it's not only throwing an exception, it is also not updating like I want it to. I want the UI elements in the OnCPUDetEvent() function to update based off of the timer I have set up. Here's my code: using System; using System.Collections.Generic; using System.Management.Instrumentation; using System