public DockingManagerRegionAdapterLayoutStrategy(ILayoutUpdateStrategy wrappedStrategy)
 {
     if (wrappedStrategy != null)
     {
         m_WrappedStrategy = wrappedStrategy;
     }
 }
 public DockingManagerRegionAdapterLayoutStrategy(ILayoutUpdateStrategy wrappedStrategy)
 {
     if (wrappedStrategy != null)
     {
         m_WrappedStrategy = wrappedStrategy;
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Class Constructor
        /// </summary>
        /// <param name="paneSel"></param>
        /// <param name="documentHeaderTemplate"></param>
        /// <param name="panesStyleSelector"></param>
        /// <param name="layoutInitializer"></param>
        /// <param name="layoutId"></param>
        public void InitTemplates(DataTemplateSelector paneSel,
                                  DataTemplate documentHeaderTemplate,
                                  StyleSelector panesStyleSelector,
                                  ILayoutUpdateStrategy layoutInitializer,
                                  Guid layoutId
                                  )
        {
            _LayoutItemTemplateSelector       = paneSel;
            _DocumentHeaderTemplate           = documentHeaderTemplate;
            _LayoutItemContainerStyleSelector = panesStyleSelector;
            _LayoutUpdateStrategy             = layoutInitializer;
            LayoutId = layoutId;

            if (_mDockManager == null)
            {
                return;
            }

            SetCustomLayoutItems();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Class Constructor
        /// </summary>
        /// <param name="paneSel"></param>
        /// <param name="documentHeaderTemplate"></param>
        /// <param name="panesStyleSelector"></param>
        /// <param name="layoutInitializer"></param>
        /// <param name="layoutID"></param>
        public void SetTemplates(DataTemplateSelector paneSel,
                                 DataTemplate documentHeaderTemplate,
                                 StyleSelector panesStyleSelector,
                                 ILayoutUpdateStrategy layoutInitializer,
                                 Guid layoutID
                                 )
        {
            this.mLayoutItemTemplateSelector       = paneSel;
            this.mDocumentHeaderTemplate           = documentHeaderTemplate;
            this.mLayoutItemContainerStyleSelector = panesStyleSelector;
            this.mLayoutUpdateStrategy             = layoutInitializer;
            this.LayoutID = layoutID;

            if (this.mDockManager == null)
            {
                return;
            }

            this.SetCustomLayoutItems();
        }
        protected override void Adapt(IRegion region, DockingManager regionTarget)
        {
            if (region == null)
            {
                throw new ArgumentNullException("region");
            }
            if (regionTarget == null)
            {
                throw new ArgumentNullException("regionTarget");
            }

            ILayoutUpdateStrategy currentLayoutStrategy = regionTarget.LayoutUpdateStrategy;

            regionTarget.LayoutUpdateStrategy = new DockingManagerRegionAdapterLayoutStrategy(currentLayoutStrategy);

            // Add the behavior that synchronizes the items source items with the rest of the items.
            region.Behaviors.Add(
                DockingManagerLayoutContentSyncBehavior.BehaviorKey,
                new DockingManagerLayoutContentSyncBehavior(regionTarget));
            base.AttachBehaviors(region, regionTarget);
        }