To get it to work.
In your class
private SynchronizationContext synchronizationContext;
In the UI thread (main thread)
synchronizationContext = System.Threading.SynchronizationContext.Current;
In the worker thread
synchronizationContext.Post(
state => DoUpdateInUIThread((Abc)state),
abc);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…