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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 5
0
        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;
        }
        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);
        }
 /// <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;
 }
 /// <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;
 }
 /// <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;
 }
Exemplo n.º 10
0
 internal void MoveTo(CanvasSection newSection, CanvasColumn newColumn)
 {
     this.section = newSection;
     this.column  = newColumn;
 }
 /// <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;
 }
 /// <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;
 }
Exemplo n.º 13
0
 internal void MoveTo(CanvasSection section)
 {
     this.section = section;
 }