51051

Busy indicator not showing up in wpf window [duplicate]

<strong>Possible Duplicate:</strong> wpf busyindicator not showing up

I am tryihng to use busy indicator in a window like this:

<extToolkit:BusyIndicator Width="160" Height="100" x:Name="busyIndicator" Visibility="Hidden" />

I am trying to call this when the user chooses some files to import and then im doing some parsing on those files.

And setting these two properties:

importProgressBar.busyIndicator.IsBusy = true; importProgressBar.busyIndicator.Visibility = Visibility.Visible;

before the window pops up.

I am calling a delegate function whenever a file parsing is finished. And inside that I'm calling the window with the busy indicator.

private void ShowIndicator(ProgressReport progressReport) { window.Show(); if (progressReport.OverallProgress.Completed) { window.Close(); } }

So as you can see inside this function I have property completed which on complete will close the window automatically but the window shows up with no busy indicator.

Can someone point out why busy indicator is not showing in window?

Answer1:

use:

Dispatcher.Invoke(DispatcherPriority.Background, new Action(() => { Window.Show() }));

Recommend

  • Newbie: Invalid cross thread access with using busyindicator (silverlight and wcf service)
  • displaying Busy Indicator on a thread and launching the application : Threading error (The calling t
  • How to find out the solid color used for the Windows Wallpaper?
  • How to break up an array into strings MVC?
  • How to check the permission whether a friend allow me to post on his wall or not using php sdk
  • Workflow - Database Design
  • Get Currently Active User in Android
  • insert radio value multiple data codeigniter in database to one row?
  • Universal Image Loader reuse images
  • How to handle AllServersUnavailable Exception
  • How to model a transition system with SPIN
  • VBA Convert delimiter text file to Excel
  • ORA-29908: missing primary invocation for ancillary operator
  • Matplotlib draw Spline from multiple points
  • Why winpcap requires both .lib and .dll to run?
  • Return words with double consecutive letters
  • SVN: Merging two branches together
  • jqPlot EnhancedLegendRenderer plugin does not toggle series for Pie charts
  • How do I rollback to a specific git commit
  • Is there a mandatory requirement to switch app.yaml?
  • How to disable jQuery.jplayer autoplay?
  • Python: how to group similar lists together in a list of lists?
  • Load html files in TinyMce
  • -fvisibility=hidden not passed by compiler for Debug builds
  • Change div Background jquery
  • How to stop GridView from loading again when I press back button?
  • Turn off referential integrity in Derby? is it possible?
  • How does Linux kernel interrupt the application?
  • Authorize attributes not working in MVC 4
  • Bitwise OR returns boolean when one of operands is nil
  • sending mail using smtp is too slow
  • Why is Django giving me: 'first_name' is an invalid keyword argument for this function?
  • Observable and ngFor in Angular 2
  • How to Embed XSL into XML
  • How can I use `wmic` in a Windows PE script?
  • UserPrincipal.Current returns apppool on IIS
  • Conditional In-Line CSS for IE and Others?
  • Python/Django TangoWithDjango Models and Databases
  • Why do underscore prefixed variables exist?
  • Net Present Value in Excel for Grouped Recurring CF