private void InternalSetActiveContent(LayoutContent currentValue, LayoutContent newActiveContent)
 {
     RaisePropertyChanging("ActiveContent");
     if (currentValue != null)
     {
         currentValue.IsActive = false;
     }
     _activeContent = new WeakReference(newActiveContent);
     currentValue   = ActiveContent;
     if (currentValue != null)
     {
         currentValue.IsActive = true;
     }
     RaisePropertyChanged("ActiveContent");
     _activeContentSet = currentValue != null;
     if (currentValue != null)
     {
         if (currentValue.Parent is LayoutDocumentPane || currentValue is LayoutDocument)
         {
             LastFocusedDocument = currentValue;
         }
     }
     else
     {
         LastFocusedDocument = null;
     }
 }
Esempio n. 2
0
        public int IndexOf(LayoutContent content)
        {
            var anchorableChild = content as LayoutAnchorable;
            if (anchorableChild == null)
                return -1;

            return Children.IndexOf(anchorableChild);
        }
Esempio n. 3
0
        public int IndexOf(LayoutContent content)
        {
            LayoutAnchorable layoutAnchorable = content as LayoutAnchorable;

            if (layoutAnchorable == null)
            {
                return(-1);
            }
            return(base.Children.IndexOf(layoutAnchorable));
        }
Esempio n. 4
0
        private void UpdateActiveContentProperty()
        {
            LayoutContent activeContent = this.ActiveContent;

            if (this._activeContentSet && (activeContent == null || activeContent.Root != this))
            {
                this._activeContentSet = false;
                this.InternalSetActiveContent(activeContent, null);
            }
        }
Esempio n. 5
0
        public int IndexOf(LayoutContent content)
        {
            var anchorableChild = content as LayoutAnchorable;

            if (anchorableChild == null)
            {
                return(-1);
            }

            return(Children.IndexOf(anchorableChild));
        }