How to implement async pattern in windows forms application?

Posted by Alkersan on Stack Overflow See other posts from Stack Overflow or by Alkersan
Published on 2010-03-01T15:18:28Z Indexed on 2010/04/22 11:33 UTC
Read the original article Hit count: 203

I'm using an MVC pattern in winforms application. I need to call remote service asynchronously. So On some event in View I invoke corresponding Presenter method. In Presenter I call BeginInvoke method of service. But to View must be updated only in Main Thread. I could actualy point CallBack to some function in View, and update it`s controls state, but this conflicts with MVP pattern - View must not be responsible for data it carries. This callback function must be in Presenter. But how then invoke View in Main Thread?

© Stack Overflow or respective owner

Related posts about winforms

Related posts about mvp