updating progress bar

Topics: Prism v4 - WPF 4
Jun 20, 2011 at 5:55 AM
Edited Jun 20, 2011 at 6:18 AM

As ViewA is fetching stuff from a database I want to give the user some feedback on how this is going by editing some text in ViewB.

I publish the event in ViewA like this;

            var payload = new StatusBarMessagePayload();
            payload.String1 = message;

I call this 8 times, with the message changing each time (ie "step 1 of 8","step 2 of 8","step 3 of 8" ... "step 4 of 8"), like this;







(each pair 8 times)


and handle it with this code (in ViewB);

            this._eventAggregator.GetEvent<StatusBarMessageEvent>().Subscribe(Handle_Message, ThreadOption.UIThread, true);


tb1.Text = payload.String1;

ViewB handles the event all 8 times, but tb1 is only updating once (the last time).

What am I doing wrong?

thank all

Jun 21, 2011 at 10:04 PM


If you application is under an MVVM architecture, one possible reason for this behavior could be that your view model doesn’t implement the INotifyPropertyChanged interface. Also, if your view models implements INotifyPropertyChanged, you need to call the RaisePropertyChange event in order to update the values of your bind controls.

In case you continue experiencing this behavior, it could be helpful if you could provide us with your repro sample (for example, uploading to SkyDrive) of your solution, so that we can help you find out the cause.

I hope you find this information useful.


Miguel Bronzovic


Jul 12, 2011 at 2:06 AM

We are having almost EXACTLY the same issue.  Did you ever figure anything out on this topic?  We suspect the problem lies somehow with the synchronous nature of the callbacks and the fact that we're listening on the UI Thread in order to update the UI with the status message.  But obviously we're not sure because we haven't gotten it working either.

Any progress on this?

Thanks in advance.