public static class RunicWindowPresentationExtensions Observes a Window's activity without an MVVM library.
Methods
ObserveActivity
public static IObservable<RunicWindowActivity> ObserveActivity(this IRunicWindowPresentation presentation) Returns the Window's activity as an observable sequence: the current value when subscribed, then each change, in the turns that raise IRunicWindowPresentation.ActivityChanged.
Parameters
presentationThe Window's presentation.
Remarks
A plain IObservable, so ReactiveUI composes it with either flavor, for example to pause a timer:
window.ObserveActivity().Select(activity => activity.IsActive).DistinctUntilChanged().Subscribe(...)Disposing the subscription removes its handler. The sequence never completes; it ends with the Window's scope.