0

I am loading data from server using webRequest, AsyncCallback. It includes links to images etc. It is in the form of large xml.

My xaml page needs the data from the server to complete its design view.

What is the appropriate way of using the webRequest and asyncCallback so that first the data is loaded from the server and then the xaml page is loaded??

I would like to show a loading screen/progress bar while the data is being loaded from the server.

I am new to windows Phone. Please help.

All help is appreciated

kshitijgandhi
  • 1,532
  • 1
  • 16
  • 28

1 Answers1

0

You can always navigate to some other page in the async callback for the WebRequest. Please post your code so that we can give an appropriate response.

Your code should be structured something like:

public class SplashPage
{
    public SplashPage()
    {
        // init op and assign callback
    }

    private void asyncCallback()
    {
        NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
    }
}
Toni Petrina
  • 7,014
  • 1
  • 25
  • 34
  • Please check my new question http://stackoverflow.com/questions/18207730/how-to-make-ordinary-webrequest-async-and-awaitable Splash screen/progress bar is less major issue – kshitijgandhi Aug 13 '13 at 12:07
  • Please check my new question http://stackoverflow.com/questions/18207730/how-to-make-ordinary-webrequest-async-and-awaitable Splash screen/progress bar is less major issue – kshitijgandhi Aug 13 '13 at 12:08
  • That is another question, do you still need help with *navigating* once the async operation is complete? – Toni Petrina Aug 13 '13 at 12:10
  • Thank You :) I think I solved the problem (I Think - hopefully) I am very confused - its a big project(for a beginner) – kshitijgandhi Aug 13 '13 at 12:50