/// <summary> /// Creates a list item containing this component. /// </summary> /// <param name="content"></param> /// <param name="displaySetup"></param> /// <param name="classes">The classes on the item.</param> /// <param name="visualOrderRank"></param> /// <param name="updateRegionSets">The intermediate-post-back update-region sets that this item will be a part of.</param> /// <param name="etherealContent"></param> public static ComponentListItem ToComponentListItem( this FlowComponent content, DisplaySetup displaySetup = null, ElementClassSet classes = null, int?visualOrderRank = null, IEnumerable <UpdateRegionSet> updateRegionSets = null, IReadOnlyCollection <EtherealComponent> etherealContent = null) => content.ToCollection() .ToComponentListItem( displaySetup: displaySetup, classes: classes, visualOrderRank: visualOrderRank, updateRegionSets: updateRegionSets, etherealContent: etherealContent);
/// <summary> /// Creates a form item with this component. /// </summary> /// <param name="content">Do not pass null.</param> /// <param name="setup"></param> /// <param name="label">The form-item label.</param> /// <param name="validation"></param> public static FormItem ToFormItem( this FlowComponent content, FormItemSetup setup = null, IReadOnlyCollection <PhrasingComponent> label = null, EwfValidation validation = null) => content.ToCollection().ToFormItem(setup: setup, label: label, validation: validation);
private FlowComponent getBox(FlowComponent content) => new Section(content.ToCollection(), style: SectionStyle.Box);
/// <summary> /// Creates a table cell containing this component. If called on null, creates an empty cell. /// </summary> /// <param name="content"></param> /// <param name="setup"></param> public static EwfTableCell ToCell(this FlowComponent content, TableCellSetup setup = null) => (content?.ToCollection()).ToCell(setup: setup);
private IEnumerable <Control> getBox(FlowComponent content) => new Section(content.ToCollection(), style: SectionStyle.Box).ToCollection().GetControls();