Instead of taking a reference to the Bootstrapper, it takes a configuration
object which is populated by the Bootrapper. This will pave the way for
easier views-in-multiple-assemblies handling in the near future...
This also involved some work to remove registering Stylet's assembly with
the IoC container and the ViewManager. It wasn't really necessary
anyway and just slowed things down.
This means there's no further confusion around screens being deactivated
without first being activated. This is also closer to the Caliburn.Micro
model.
The Initial state used to be useful for determining the first transition
to Activated, but that turned out not to work, see recent commits.
This caused a regression when screen states were added. Childre of
conductors are deactivated initially, then activated when the parent is
activated. This caused the Initial -> Deactivated transition. Then when
the child was activated, the 'from' state was not Initial, and so the
OnInitialActivate method was not called.
The choice to remain in Initial in this case makes sense: we don't want
to go to Deactivated (and come up with another mechanism for firing
OnInitialActivate), as that would fire OnDeactivate without there being
a corresponding OnActivate, which might mess things up.
This takes the old flag-based state management in Screen, and replaces it
with one based on a ScreenState enum. This also gives a way for
interested parties to query the current state, and for an event which
notifies of any state transition.
This meant combining IActivate, IDeactivate, and IClose. This is a sensible
move: these interfaces were inextricably linked anyway, and separating
them had no advantages and a few disadvantages. If external parties are
using these interfaces directly, then migration is necessary, but these
are usually only used by Conductors
Instead, it has an abstract RootViewModel property, which bootstrapper
overrides to return an instance of TRootViewModel from the container.
This means that the root ViewModel is treated a singleton by the bootstrapper,
regardless of whether it's singleton in the container