/// <summary>
        /// Provides derived classes an opportunity to handle changes to the IsActiveDocument property.
        /// </summary>
        protected virtual void OnIsActiveDocumentChanged(DependencyPropertyChangedEventArgs e)
        {
            if ((bool)e.NewValue)
            {
                if (ContainerPane != null)
                {
                    ContainerPane.SelectedItem = this;
                }
            }

            DocumentPane parentDocumentPane = ContainerPane as DocumentPane;

            if (parentDocumentPane != null)
            {
                parentDocumentPane.RefreshContainsActiveDocumentProperty();
            }

            //Debug.WriteLine("{0}-{1}-{2}", IsFocused, IsKeyboardFocused, IsKeyboardFocusWithin);

            //for backward compatibility
            RaisePropertyChanged("IsActiveDocumentChanged");

            if (IsActiveDocumentChanged != null)
            {
                IsActiveDocumentChanged(this, EventArgs.Empty);
            }
        }
Пример #2
0
        public DocumentPane CreateNewHorizontalTabGroup()
        {
            var activeContent    = SelectedItem as ManagedContent;
            var oldContainerPane = activeContent.ContainerPane as DocumentPane;
            var newContainerPane = new DocumentPane();

            oldContainerPane.RemoveContent(activeContent);
            newContainerPane.Items.Add(activeContent);

            GetManager().Anchor(newContainerPane, this, AnchorStyle.Bottom);

            activeContent.Activate();
            newContainerPane.RefreshContainsActiveContentProperty();
            newContainerPane.RefreshContainsActiveDocumentProperty();
            oldContainerPane.RefreshContainsActiveContentProperty();
            oldContainerPane.RefreshContainsActiveDocumentProperty();

            return(newContainerPane);
        }
Пример #3
0
        public DocumentPane CreateNewVerticalTabGroup()
        {
            var activeContent = SelectedItem as ManagedContent;
            var oldContainerPane = activeContent.ContainerPane as DocumentPane;
            var newContainerPane = new DocumentPane();

            oldContainerPane.RemoveContent(activeContent);
            newContainerPane.Items.Add(activeContent);

            GetManager().Anchor(newContainerPane, this, AnchorStyle.Right);
            
            activeContent.Activate();
            newContainerPane.RefreshContainsActiveContentProperty();
            newContainerPane.RefreshContainsActiveDocumentProperty();
            oldContainerPane.RefreshContainsActiveContentProperty();
            oldContainerPane.RefreshContainsActiveDocumentProperty();


            return newContainerPane;
        }