Milan Solanki
Milan Solanki

Reputation: 1207

Wpf IsBusy indicator

In my wpf application, I am using extended wpftoolkit BusyIndicator, problem is the isbusy property cannot be updated from the viewmodel, how to i update it from the viewmodel or other process.

please any articles, links, references.

Thank you i advance.

Upvotes: 0

Views: 2227

Answers (2)

Matt West
Matt West

Reputation: 2944

What do you mean by IsBusy can't be updated from the ViewModel? Do you mean that when you set it the View doesn't change? Is this because you are doing some resource intesive work on the UI thread? If that is the case what you want to do is use a BackgroundWorker to do your actually work. Here is a good article on it. You can then set the IsBusy property and it will show up in your view because the long running code will be on the worker thread.

http://elegantcode.com/2009/07/03/wpf-multithreading-using-the-backgroundworker-and-reporting-the-progress-to-the-ui/

Upvotes: 1

brunnerh
brunnerh

Reputation: 184832

If you have a ViewModel i would bind the IsBusy to a respective property, then you just need to change that.

e.g.

<extToolkit:BusyIndicator IsBusy="{Binding IsProcessing}" />

Upvotes: 1

Related Questions