locked
Progress Ring dismiss as data updated from serever RRS feed

  • Question

  • Hi i m android developer in android we used following code for progress Dialog ...

    how i get it in windows store app as i am new in windows...

    thanks 

    protected void onPreExecute() {
    progressDialog = new ProgressDialog(WelcomeMsg.this);
    }
    protected Void doInBackground(Void... params) {
    //server call 
    }
    protected void onPostExecute(){
    progressDialog.dismiss()
    }

    Tuesday, January 21, 2014 12:09 PM

Answers

  • It's the same concept.  Once your data is complete, set ProgressRing.IsActive to false.  From the docs:

    Use a ProgressRing to visually indicate that an operation is in progress. Set the IsActive property to turn the ProgressRing on or off. If IsActive is false, the ProgressRing is not shown, but space is reserved for it in the UI layout. To not reserve space for the ProgressRing, set its Visibility property to Collapsed.

    Tip  When the ProgressRing is active, the progress animation continues even if its not visible on the screen, such as when it's Visibility is Collapsed. This can keep the UI thread awake, use resources, and impair app performance. When the ProgressRing is not visible, you should disable the animation by setting IsActive to false.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, January 21, 2014 2:04 PM
    Moderator
  • Note: if you're using the new Windows.Web.Http HttpClient, you can create a simple 'filter' that plugs into the Http processing pipeline and which handles this for you.  That way, your business logic can simply be normal GETs and POSTs, and the progress ring comes up automatically.

    Network Developer Experience Team (Microsoft)

    Tuesday, January 21, 2014 10:45 PM

All replies

  • It's the same concept.  Once your data is complete, set ProgressRing.IsActive to false.  From the docs:

    Use a ProgressRing to visually indicate that an operation is in progress. Set the IsActive property to turn the ProgressRing on or off. If IsActive is false, the ProgressRing is not shown, but space is reserved for it in the UI layout. To not reserve space for the ProgressRing, set its Visibility property to Collapsed.

    Tip  When the ProgressRing is active, the progress animation continues even if its not visible on the screen, such as when it's Visibility is Collapsed. This can keep the UI thread awake, use resources, and impair app performance. When the ProgressRing is not visible, you should disable the animation by setting IsActive to false.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, January 21, 2014 2:04 PM
    Moderator
  • Note: if you're using the new Windows.Web.Http HttpClient, you can create a simple 'filter' that plugs into the Http processing pipeline and which handles this for you.  That way, your business logic can simply be normal GETs and POSTs, and the progress ring comes up automatically.

    Network Developer Experience Team (Microsoft)

    Tuesday, January 21, 2014 10:45 PM