/// <summary> /// Loops over <paramref name="controls"/> and adds the corresponding application values /// in <paramref name="container"/> to the <paramref name="table"/>. /// </summary> /// <param name="table">The <see cref="MigraDoc.DocumentObjectModel.Tables.Table"/> to write to.</param> /// <param name="controls">The list of controls.</param> /// <param name="container">The application data container.</param> /// <param name="level">The depth down the control tree being rendered (affects indenting).</param> private void WriteValue(Table table, ControlList controls, Dictionary<string, object> container, int level) { IEnumerable<Control> orderedControls = controls.OrderBy(c => c.Position); foreach (Control control in orderedControls) { this.WriteValue(table, control, container, level); } }