Ejemplo n.º 1
0
        internal async Task InitializeWindow(IWorkbenchWindow window)
        {
            this.window     = window;
            window.Document = this;

            view = await controller.GetDocumentView();

            view.IsRoot = true;
            window.SetRootView(view.CreateShellView(window));

            LastTimeActive              = DateTime.Now;
            this.window.CloseRequested += Window_CloseRequested;

            SubscribeControllerEvents();
            DocumentRegistry.Add(this);
        }
Ejemplo n.º 2
0
        internal async Task InitializeViewAsync()
        {
            var docView = await controller.GetDocumentView();

            if (closed)
            {
                docView.Dispose();
                return;
            }
            view = docView;
            view.ActiveViewInHierarchyChanged += ActiveViewInHierarchyChanged;
            view.IsRoot = true;
            window.SetRootView(view.CreateShellView(window));

            // The view may provide additional content, so raise the content change.
            // The document can be returned before the view is initialized, so
            // there may already be content subscribers.
            OnContentChanged();
        }