예제 #1
0
        public SimpleModule AddPage <TActivation>(TActivation activation) where TActivation : IModuleToken
        {
            var module = _activator.Activate(activation);

            Attach(module, activation);
            return(module);
        }
예제 #2
0
        private void ActivateContent(PageControllerToken token)
        {
            var tabControllerToken = new TabControllerToken();

            if (token.Content == null)
            {
                _activator.ActivateAsync(tabControllerToken)
                .ToObservable()
                .ObserveOnDispatcher(DispatcherPriority.Background)
                .Subscribe(module => {
                    _host = module.Injector.Locate <TabPageHost>();
                    this.CentralControl = module.GetEntryComponent();
                    _host.AddPageAsync(token.ContentToken);
                });
            }
            else
            {
                var tabModule = _activator.Activate(tabControllerToken);
                _host = tabModule.Injector.Locate <TabPageHost>();
                this.CentralControl = tabModule.GetEntryComponent();
                // _host.Attach(token.Content);
            }
        }