I would like to update a field on a DetailView for a non-persistent object (inherited from XPCustomObject) using the Timer.Elapsed event in a WinForms XAF Application. While the timer runs in the background (started in the ViewController<DetailView>.OnActivated method) the user should be free to edit any other fields on the form, which includes lookup editors, date editors and strings. The values I want to update have the [ImmediatePostData] attribute in the Business Object class, and use the standard XAF SetPropertyValue<> setters.
In the Controller's Timer Elapsed method I've tried various combination of View.Refresh, View.ObjectSpace.Refresh, View.UpdateItem etc without being able to get the new values to display. I've tried setting the values indirectly using a custom SetFieldValue method on the object which explicitly includes a Changed(property) call - but still no update until the user clicks on the field, when the value set in the background is suddenly displayed.
ObjectSpace refreshes do impact on the user's ability to use persistent object lookup editors (ObjectEdit/LookupEdit) - they go blank when the ObjectSpace is refreshed, which I need to avoid if the user is to be able to use the DetailView uninterrupted in the foreground.
What is the magic process to use to refresh the displayed values of a Non-Persistent object's DetailView ViewItems from a Timer.Elapsed event (or presumably any other operation running in a different thread), without breaking persistent object lookups?