InvalidOperationException: 调用线程无法访问此对象,因为另一个线程拥有该对象。 StackTrace: 在 System.Windows.Threading.Dispatcher.VerifyAccess() 在 DynamicClass.<>c__DisplayClassf.<OnButtonClicked>b__c() 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 在 System.Threading.ThreadHelper.ThreadStart()