您应该使用DispatcherTimer并将DispatcherPriority设置为DispatcherPriority.ApplicationIdle或DispatcherPriority.SystemIdle(取决于您的目标).
我想会是这个。
在 DispatcherObject(例如 Window 或 UserControl)中:
this.Dispatcher.BeginInvoke(new Action(() => SomeMethod()), DispatcherPriority.ApplicationIdle);
Run Code Online (Sandbox Code Playgroud)