Show BusyIndicator from WPF.ExtendedToolkit

Feb 11, 2011 at 3:38 PM
Edited Feb 11, 2011 at 4:12 PM

Hi I try show busy indicator in shell which is wpf window.

In shell view I have this:



<extToolkit:BusyIndicator IsBusy="{Binding Path=ShellIsBusy, Mode=OneWay,
BusyContent="{Binding Path=BusyMessage,Mode=OneWay,
<ContentControl x:Name="ActiveItem" />



Shell model class is here:


public class ShellViewModel : Conductor<IScreen>.Collection.OneActive,
IShellViewModel, IPartImportsSatisfiedNotification
internal IJinglePlayer JinglePlayer { get; set; }

private bool _isBusy;
private string _busyMessage;

public bool ShellIsBusy
get { return _isBusy; }
_isBusy = value;

public string BussyMessage
get { return _busyMessage; }
_busyMessage = value;

protected override void OnInitialize()

public void Show1()
var vm = IoC.Get<ILogOnViewModel>();

public void Show2(IAccount account)
var vm = IoC.Get<IMeViewModel>();
vm.Account = account;
ActivateItem(vm); }

public void OnImportsSatisfied()



I run app, from active view model class I call this:


internal IShellViewModel Shell { get; set; }


Shell.ShellIsBusy = true;
Shell.BusyMessage = "logging";

//long task



Problem is that busy indicator is showed in the moment when is active another view.

Feb 11, 2011 at 7:29 PM
Edited Feb 11, 2011 at 7:29 PM

I'm afraid you are keeping the UI thread busy with the long running task.
In these circumstance, the label update remains queued in the Dispatcher until the UI thread gets freed again.
You have to run the long task in a background thread and restore the shell state back to not busy at the end; you may also consider using Coroutines.

Feb 11, 2011 at 9:18 PM

Thank for informartion, this I need, I solved this problem with create new view in another thread


Something like this:

                    Task.Factory.StartNew(() => { Shell.Show2(...); });