Is the presenter running on the UI thread at the time that it subscribes to the model? Just use ObserveOnDispatcher at the time your present subscribes to the observable:
// from your presenter code, which is running on the UI thread:
model.ObservableProperty.ObserveOnDispatcher().Subscribe(p => updateView(p));
Edit:
Alternatively, you can get Rx-Windows Forms Helper
and have your IMyView
interface expose an IScheduler
(which it creates by calling new ControlScheduler(control)
).
Then you can implement your ObserveOn(observable, view)
extension method as:
public static IObservable<T> ObserveOn<T>(this IObservable<T> observable, IMyView view)
{
return observable.ObserveOn(view.Scheduler);
}