Beispiel #1
0
        public void OpenDocumentWindow(DockingControl content, bool canClose = true)
        {
            if (content == null)
            {
                throw new ArgumentNullException(nameof(content));
            }

            var document = _documents.TryGetValue(content.Key);

            if (document == null)
            {
                content.Changed += OnDockingControlChanged;

                document = new LayoutDocument
                {
                    ContentId = content.Key,
                    Content   = content,
                    CanClose  = canClose
                };

                document.SetBindings(LayoutContent.TitleProperty, content, "Title");

                _documents.Add(content.Key, document);

                TabGroups.First().Children.Add(document);
                OnDockingControlChanged(content);
            }

            DockingManager.ActiveContent = document.Content;
        }
Beispiel #2
0
        public void OpenToolWindow(DockingControl content, bool canClose = true)
        {
            if (content == null)
            {
                throw new ArgumentNullException(nameof(content));
            }

            var anchorable = _anchorables.TryGetValue(content.Key);

            if (anchorable == null)
            {
                content.Changed += OnDockingControlChanged;

                anchorable = new LayoutAnchorable
                {
                    ContentId = content.Key,
                    Content   = content,
                    CanClose  = canClose
                };

                anchorable.SetBindings(LayoutContent.TitleProperty, content, "Title");

                _anchorables.Add(content.Key, anchorable);

                RootGroup.Children.Add(new LayoutAnchorablePane(anchorable));
                OnDockingControlChanged(content);
            }

            DockingManager.ActiveContent = anchorable.Content;
        }
Beispiel #3
0
 private void OnDockingControlChanged(DockingControl control)
 {
     _changedControls.Add(control);
     Flush();
 }
		private void OnDockingControlChanged(DockingControl control)
		{
			_changedControls.Add(control);
			Flush();
		}
		public void OpenDocumentWindow(DockingControl content, bool canClose = true)
		{
			if (content == null)
				throw new ArgumentNullException(nameof(content));

			var document = _documents.TryGetValue(content.Key);

			if (document == null)
			{
				content.Changed += OnDockingControlChanged;

				document = new LayoutDocument
				{
					ContentId = content.Key,
					Content = content,
					CanClose = canClose
				};

				document.SetBindings(LayoutContent.TitleProperty, content, "Title");

				_documents.Add(content.Key, document);

				TabGroups.First().Children.Add(document);
				OnDockingControlChanged(content);
			}

			DockingManager.ActiveContent = document.Content;
		}
		public void OpenToolWindow(DockingControl content, bool canClose = true)
		{
			if (content == null)
				throw new ArgumentNullException(nameof(content));

			var anchorable = _anchorables.TryGetValue(content.Key);

			if (anchorable == null)
			{
				content.Changed += OnDockingControlChanged;

				anchorable = new LayoutAnchorable
				{
					ContentId = content.Key,
					Content = content,
					CanClose = canClose
				};

				anchorable.SetBindings(LayoutContent.TitleProperty, content, "Title");

				_anchorables.Add(content.Key, anchorable);
			
				RootGroup.Children.Add(new LayoutAnchorablePane(anchorable));
				OnDockingControlChanged(content);
			}

			DockingManager.ActiveContent = anchorable.Content;
		}