Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7654729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:19:53+00:00 2026-05-31T12:19:53+00:00

In my WP7 application I loade some simple text data from the web. string

  • 0

In my WP7 application I loade some simple text data from the web.

 string url = "home url";

 var request = HttpWebRequest.Create(url);

 var result = (IAsyncResult)request.BeginGetResponse(ResponseCallback, request);

And this is how I consume the data

private void ResponseCallback(IAsyncResult result)
{
    var request = (HttpWebRequest)result.AsyncState;
    var response = request.EndGetResponse(result);

    using (var stream = response.GetResponseStream())
    using (var reader = new StreamReader(stream))
    {
        var contents = reader.ReadToEnd();

        Dispatcher.BeginInvoke(()=>
            {
                someLabelValue.Text = contents;
            });
    }
}

I added a indeterminate progress bar to my layout. Now I want to display it when my application is loading the data from the web.

How can I do that? Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:19:54+00:00Added an answer on May 31, 2026 at 12:19 pm

    Simplest way, to see it working is to go and change the .Visiblility of the progress bar to Visible when you make the call (top code extract) and call .Visibility = Collapsed when it’s done (in the second sample, inside your BeginInvoke() block).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my WP7 application I have downloaded 200 images from Web and saved in
in my WP7 application, I'm doing : string userName = IsolatedStorageSettings.ApplicationSettings.Contains(UserName) ? IsolatedStorageSettings.ApplicationSettings[UserName].ToString() :
I have created a simple wp7 application which contains 2 pages both with a
What the WP7 application needs to do? - download some others applications and install
I'm using MVVM Light to build a WP7 (Windows Phone 7) application. I wish
I am building a WP7 application which heavily uses RX and I came across
I have a page in my wp7 application which need to display an image
I am programming WP7 application adhering the MVVM pattern. I have ViewModelLocator which ensures
I have a singleton timer in my WP7 application however I have no idea
I'm trying to create an adcontrol for a wp7 application. I've set up my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.