What I came up with:
Employment indicator from the extended WPF toolkit:
<extoolkit:BusyIndicator IsBusy="{Binding IsBusy}" BusyContent="Loading data..." >
In my base class representation model, I added the following method:
protected void ExecuteBackgroundProcess(Action action)
{
IsBusy = true;
Task task = Task.Factory.StartNew(() => action()).ContinueWith((s) => this.IsBusy = false);
}
, :
this.ExecuteBackgroundProcess(() =>
{
var collection = _securityRepo.TakeOfType<Security>(10).ToObservableCollection();
DispatcherHelper.CheckBeginInvokeOnUI(() =>
{
Securities = collection;
RaisePropertyChanged("Securities");
});
});
CodeProject :
http://www.codeproject.com/KB/WPF/ThreadingComponent.aspx?msg=3319891