reactiveui/ReactiveUI — pull request #624 by rikbosch (2014-05-27 12:47:10+00:00)
Title: Adding Activation Support for Winforms Views. (ref #604)

This PR adds basic winforms activation support.

ViewActivation is based on several events:
- Visible changed
- Closed (when control is a form)
- HandleCreated
- HandleDestroyed

the ActivationForViewFetcher creates a observable stream of booleans where true=active and false=not active.

Using DistinctUntilChanged for the actived and deactivated observables, a view can only be active or not active.

Please note that WinForms users are better off implementing the ICanActivate in their views for more control over activation. e.g. when a parent (or grandparent etc) of a usercontrol is hidden, the VisibleChanged of the child is not raised. As a result, the view stays active but it is not painted.
If anyone has Idea's how to implement this into a nice Rx way... all hints are welcome.