2
如何進入某些類我必須指定此構造函數才能調用回調?DispatcherTimer構造函數
_timer = new DispatcherTimer(DispatcherPriority.Normal, Application.Current.Dispatcher);
而不只是:
_timer = new DispatcherTimer();
如何進入某些類我必須指定此構造函數才能調用回調?DispatcherTimer構造函數
_timer = new DispatcherTimer(DispatcherPriority.Normal, Application.Current.Dispatcher);
而不只是:
_timer = new DispatcherTimer();
默認構造函數將使用當前調度程序,而不是當前應用程序的調度。如果在UI線程以外的線程上調用此函數,則需要首先進行重載以獲取正確的同步上下文。