/// <summary>
        /// Ensures that the specified component has been started.
        /// </summary>
        public override void EnsureStarted(IApplicationComponent component)
        {
            ContainerPage page = CollectionUtils.SelectFirst <ContainerPage>(_pages,
                                                                             delegate(ContainerPage p) { return(p.Component == component); });

            EnsureStarted(page);
        }
        /// <summary>
        /// Ensures that the specified <see cref="ContainerPage"/> is stopped, regardless of whether or not it is visible.
        /// </summary>
        /// <param name="page"></param>
        protected void EnsureStopped(ContainerPage page)
        {
            PageHost host = _mapPageToHost[page];

            if (host.IsStarted)
            {
                host.StopComponent();
                page.Component.ModifiedChanged -= Component_ModifiedChanged;
            }
        }
        /// <summary>
        /// Ensures that the specified <see cref="ContainerPage"/> is started, regardless of whether or not it is visible.
        /// </summary>
        protected void EnsureStarted(ContainerPage page)
        {
            PageHost host = _mapPageToHost[page];

            if (!host.IsStarted)
            {
                page.Component.ModifiedChanged += Component_ModifiedChanged;
                host.StartComponent();
            }
        }
 internal PageHost(PagedComponentContainer <TPage> container, ContainerPage page)
     : base(container, page.Component)
 {
 }
        /// <summary>
        /// Gets the view for the specified page.
        /// </summary>
        public IApplicationComponentView GetPageView(ContainerPage page)
        {
            PageHost host = _mapPageToHost[page];

            return(host.ComponentView);
        }