Jun 20, 2011 at 4:55 AM
Edited Jun 20, 2011 at 5: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?