vb.net - Convert InvokeRequired to Dispatch in VB WPF -


hello i'm stuck on last section of code in i'm converting standard vb vb wpf using invoke commands i'm struggling use them within vb wpf. i'm on final 2 lines can't seem figure out how rewrite it, possibly help?

 if me.invokerequired         me.invoke(new methodinvoker(addressof accesspicture)) 

i'm using vb wpf

you can know if invocation required checking if current thread ui thread , invoke dispatcher thread if it's required here give example in c# , it's totally same logic in vb

public void eventhandler(object object,eventargs e) { if (this.dispatcher.thread != system.threading.thread.currentthread) {  // invoke using this.dispatcher.invoke(new eventhandler(eventhandler),object,e) } else {    //execute code }  } 

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -