c# - WPF: Trigger button Press from thread other than UI thread -


i have callback function want trigger button press. have tried uiautomation interface found on question:

buttonautomationpeer peer = new buttonautomationpeer(button_read); iinvokeprovider invokeprov = peer.getpattern(patterninterface.invoke) iinvokeprovider; invokeprov.invoke(); 

but exception

the calling thread cannot access object because different thread owns it.

how can trigger button thread? there way "emit" event ui thread catches?


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -