Hi I have a problem when I am working on my Windows Phone silverlight C# application.
So I want to do something like this
- Press a button on page one. The button click handler calls a async method
MakeRequestin other class to retrieve data. The async method will fire a eventDataReadyEventand has the result wrapped asDataEventArgs.The handler of this event will be in Page2. So after add a handler to this event, I navigate to Page2 from current page. - I want to retrieve data by a event handler in Page 2 code behind and update that on UI. But the event handler is static (so that I can add it by using
Page2.handler_method_namein page1 code without creating a new instance of the page.). Since the handler method is static, I cannot use Dispatcher.Invoke and get back to the UI thread and update UI.
So in this case, anyone has any idea to it? I just want to call a async method in page1, and update result to UI in page2. Thank you