Method ObserveOn
ObserveOn<TSource>(IObservable<TSource>, Control)
Wraps the source sequence in order to run its observer callbacks in the UI thread of the specified control.
public static IObservable<TSource> ObserveOn<TSource>(this IObservable<TSource> source, Control control)
Parameters
sourceIObservable<TSource>The observable sequence whose notifications will be scheduled in the UI thread of the specified control.
controlControlA Control object whose underlying handle will be used to schedule notifications.
Returns
- IObservable<TSource>
An observable sequence with the same elements as the
sourcesequence, but where all notifications will be raised in the UI thread of the specifiedcontrol.
Type Parameters
TSourceThe type of the elements in the
sourcesequence.