コード例 #1
0
        public void AddSection(CanvasSection section, int order)
        {
            if (section == null)
            {
                throw new ArgumentNullException("Passed section cannot be null");
            }

            section.Order = order;
            this.sections.Add(section);
        }
コード例 #2
0
        internal CanvasColumn(CanvasSection section, int order)
        {
            if (section == null)
            {
                throw new ArgumentNullException("Passed section cannot be null");
            }

            this.section = section;
            this.Order   = order;
        }
コード例 #3
0
        // internal constructors as we don't want users to manually create sections
        #region construction
        internal CanvasColumn(CanvasSection section)
        {
            if (section == null)
            {
                throw new ArgumentNullException("Passed section cannot be null");
            }

            this.section      = section;
            this.columnFactor = 12;
            this.Order        = 0;
        }
コード例 #4
0
        internal CanvasColumn(CanvasSection section, int order, int?sectionFactor)
        {
            if (section == null)
            {
                throw new ArgumentNullException("Passed section cannot be null");
            }

            this.section = section;
            this.Order   = order;
            // if the sectionFactor was undefined is was not defined as there was no section in the original markup. Since we however provision back as one column page let's set the sectionFactor to 12.
            this.columnFactor = sectionFactor.HasValue ? sectionFactor.Value : 12;
        }
コード例 #5
0
ファイル: CanvasColumn.cs プロジェクト: wspelt/PnP-Sites-Core
        internal CanvasColumn(CanvasSection section, int order, int?sectionFactor, int?layoutIndex)
        {
            if (section == null)
            {
                throw new ArgumentNullException("Passed section cannot be null");
            }

            this.section      = section;
            this.Order        = order;
            this.columnFactor = sectionFactor.HasValue ? sectionFactor.Value : 12;
            this.layoutIndex  = layoutIndex.HasValue ? layoutIndex.Value : 1;
        }
コード例 #6
0
        public void AddControl(CanvasControl control, CanvasSection section)
        {
            if (control == null)
            {
                throw new ArgumentNullException("Passed control cannot be null");
            }
            if (section == null)
            {
                throw new ArgumentNullException("Passed section cannot be null");
            }

            control.zone    = section.Zone;
            control.section = section;

            this.controls.Add(control);
        }
コード例 #7
0
 /// <summary>
 /// Moves the control to another section and column
 /// </summary>
 /// <param name="newColumn">New column that will host the control</param>
 public void Move(CanvasColumn newColumn)
 {
     this.section = newColumn.Section;
     this.column  = newColumn;
 }
コード例 #8
0
 /// <summary>
 /// Moves the control to another section and column
 /// </summary>
 /// <param name="newSection">New section that will host the control</param>
 /// <param name="order">New order for the control in the new section</param>
 public void Move(CanvasSection newSection, int order)
 {
     Move(newSection);
     this.order = order;
 }
コード例 #9
0
 /// <summary>
 /// Moves the control to another section and column
 /// </summary>
 /// <param name="newSection">New section that will host the control</param>
 public void Move(CanvasSection newSection)
 {
     this.section = newSection;
     this.column  = newSection.DefaultColumn;
 }
コード例 #10
0
 internal void MoveTo(CanvasSection newSection, CanvasColumn newColumn)
 {
     this.section = newSection;
     this.column  = newColumn;
 }
コード例 #11
0
 /// <summary>
 /// Moves the control to another zone and section
 /// </summary>
 /// <param name="newSection">New section that will host the control</param>
 public void Move(CanvasSection newSection)
 {
     this.zone    = newSection.Zone;
     this.section = newSection;
 }
コード例 #12
0
 /// <summary>
 /// Moves the control to another zone and section
 /// </summary>
 /// <param name="newZone">New zone that will host the control</param>
 public void Move(CanvasZone newZone)
 {
     this.zone    = newZone;
     this.section = newZone.DefaultSection;
 }
コード例 #13
0
ファイル: CanvasColumn.cs プロジェクト: wspelt/PnP-Sites-Core
 internal void MoveTo(CanvasSection section)
 {
     this.section = section;
 }