public void AddZone(CanvasZone zone) { if (zone == null) { throw new ArgumentNullException("Passed zone cannot be null"); } this.zones.Add(zone); }
internal CanvasSection(CanvasZone zone, int order) { if (zone == null) { throw new ArgumentNullException("Passed zone cannot be null"); } this.zone = zone; this.Order = order; }
public void AddControl(CanvasControl control, CanvasZone zone) { if (control == null) { throw new ArgumentNullException("Passed control cannot be null"); } if (zone == null) { throw new ArgumentNullException("Passed zone cannot be null"); } control.zone = zone; control.section = zone.DefaultSection; this.controls.Add(control); }
/// <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> /// <param name="order">New order for the control in the new zone</param> public void Move(CanvasZone newZone, int order) { Move(newZone); this.order = order; }
/// <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; }