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

  • SEARCH
  • Home
  • 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 85605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:06:56+00:00 2026-05-10T22:06:56+00:00

In a WPF UserControl, I have to make to call to a WebService. I

  • 0

In a WPF UserControl, I have to make to call to a WebService. I am making this call on a separate thread but I want to inform the user that the call may take some time.

The WebMethod returns me a collection of objects and I bind it to a ListBox in my UC. So far, so good… This part works really well. However, I want to display a progress bar (or an animation of any kind…) during the call. This animation would be on top and centered in the ListBox control.

I tried Adorner and it partially works. However, I have to draw all controls in protected override void OnRender(DrawingContext drawingContext)… I simply want to add a control for a couple of seconds…

Anybody has an idea of how I could achieve this?

Thanks!

  • 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. 2026-05-10T22:06:57+00:00Added an answer on May 10, 2026 at 10:06 pm

    Don’t go with the adorner – what I do is have two separate container controls (usually grids) that occupy the same area of the screen. One is my ‘progress’ control, and the other is my ‘content’ control. I set the visibility of the progress control to Collapsed and the visibility of the content control to Visible by default.

    If you have it set up that way, when you start the asynchronous call to the webservice you can make the progress control visible and the content control collapsed. When the webservice finishes, have it use Dispatcher.BeginInvoke to update the UI, and at that point, switch the progress control back to collapsed and the content control back to visible.

    I generally make the progress control indeterminate. Here is an example; in this, I have a separate UserControl called ProgressGrid that has my progress bar.

        <Grid x:Name='layoutRoot'>         <Grid x:Name='contentGrid' HorizontalAlignment='Center' VerticalAlignment='Center' Visibility='Visible'>              <!-- snip -->         </Grid>          <controls:ProgressGrid x:Name='progressGrid' Text='Signing in, please wait...' Visibility='Collapsed'/>     </Grid> 

    And in the code behind, just something simple like this:

        private void SignInCommand_Executed(object sender, ExecutedRoutedEventArgs e)     {         contentGrid.Visibility = Visibility.Collapsed;         progressGrid.Visibility = Visibility.Visible;     } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 66k
  • Answers 66k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer You can just set the font size with a binding… May 11, 2026 at 11:30 am
  • added an answer You want to start by decoding the input FROM the… May 11, 2026 at 11:30 am
  • added an answer According to this blog entry, you have to use "Item[]".… May 11, 2026 at 11:30 am

Related Questions

In a WPF UserControl, I have to make to call to a WebService. I
When creating a UserControl in WPF, I find it convenient to give it some
I know how to create a custom user control in WPF but how can
In a WPF app, is there a object I can assign to FileSystemWatcher.SynchronizingObject? I
Each item in a WPF ListBox control seems to have a bit of left
I have a simple message box in a WPF application that is launched as
I'm using the ProgressBar control in a WPF application and I'm getting this old,
I'm trying to bind controls in a WPF form to an interface and I
I'm creating a WPF application where several ListView selections are made in a row
Any ideas how to display a PDF file in a WPF Windows Application? I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.