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 9215103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:07:37+00:00 2026-06-18T02:07:37+00:00

new to WPF and c# hobbyist… For some reason, I can’t get my loadingAnimation

  • 0

new to WPF and c# hobbyist…

For some reason, I can’t get my loadingAnimation (or any other) function to run immediately after a button press and before a SOAP call.

My xaml:

    <Grid>
    <TextBox Height="220" HorizontalAlignment="Left" Margin="12,79,0,0" Name="txtResults" VerticalAlignment="Top" Width="337" />
    <TextBox Height="23" HorizontalAlignment="Left" Margin="12,29,0,0" Name="txtServiceTag" VerticalAlignment="Top" Width="120" />
    <CheckBox Content="This computer's service tag" Height="16" HorizontalAlignment="Left" Margin="151,32,0,0" Name="chkThisST" VerticalAlignment="Top" Checked="chkThisST_Checked" Unchecked="chkThisST_Unchecked"/>
    <Button Content="Get Info" Height="23" HorizontalAlignment="Left" Margin="12,324,0,0" Name="btnGetInfo" VerticalAlignment="Top" Width="75" Click="btnGetInfo_Click" />
    <my:LoadingAnimation HorizontalAlignment="Center" Margin="128,154,419,127" VerticalAlignment="Center" Name="loadingAnimation" Visibility="Hidden" />
    </Grid>

My .cs:

    private void btnGetInfo_Click(object sender, RoutedEventArgs e)
    {
        txtResults.Text = "Retrieving information..."; 
        ShowHideLoading();
        SoapCall();
        ShowHideLoading();
    }

My SoapCall() seems to be running before txtResults.Text has time to populate. SoapCall() takes about 5 seconds to return a message. I’ve messed around with the order of objects in , but to no avail.

Any help is appreciated!

  • 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-06-18T02:07:39+00:00Added an answer on June 18, 2026 at 2:07 am

    The reason is that the SoapCall() is blocking the UI thread. In other words, until it is finished – no UI operations will be called.

    You can solve this by putting the SoapCall() inside a BackgroundWorker.
    Then, the ShowHideLoading can be put inside the RunWorkerCompleted event.

    Here is an example on how to use the BackgroundWorker

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

Sidebar

Related Questions

New to WPF. Simple scenario. Can't figure out the right way to do this.
I am new in WPF. Created a new WPF UserControl. See that some people
I started a new WPF project in VS2008 and then added some code to
pretty new to WPF, but i've made a Surface app to get peoples attention
I'm trying to get a legacy MFC application and a new WPF usercontrol to
When I create a new WPF application in Visual Studio 2012 the platform target
While designing a new WPF application I noticed exceptions not being thrown during data
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
New to wpf and through a learning curve. I have a userControl with a
New to wpf and therefore struggling a bit. I am putting together a quick

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.