Beispiel #1
0
 /// <summary>
 /// Creates a wrapping list.
 /// </summary>
 /// <param name="items">The items. Do not pass null.</param>
 /// <param name="generalSetup">The general setup object for the list.</param>
 /// <param name="alignment">The horizontal alignment of the items in the list.</param>
 /// <param name="verticalAlignment">The default vertical alignment of the items in the list.</param>
 public WrappingList(
     IEnumerable <WrappingListItem> items, ComponentListSetup generalSetup = null, FlexboxAlignment alignment = FlexboxAlignment.NotSpecified,
     FlexboxVerticalAlignment verticalAlignment = FlexboxVerticalAlignment.NotSpecified)
 {
     children =
         (generalSetup ?? new ComponentListSetup()).GetComponents(
             CssElementCreator.WrappingListClass.Add(FlexboxAlignmentStatics.Class(alignment)).Add(FlexboxVerticalAlignmentStatics.Class(verticalAlignment)),
             from i in items select i.ItemAndComponentGetter());
 }
 /// <summary>
 /// Creates a raw list.
 /// </summary>
 /// <param name="items">The items. Do not pass null.</param>
 /// <param name="setup">The setup object for the list.</param>
 public RawList(IEnumerable <ComponentListItem> items, ComponentListSetup setup = null)
 {
     children = (setup ?? new ComponentListSetup()).GetComponents(
         ElementClassSet.Empty,
         from i in items select i.GetItemAndComponent(ElementClassSet.Empty, null));
 }
Beispiel #3
0
 /// <summary>
 /// Creates an inline list, which separates items with a pipe character.
 /// </summary>
 /// <param name="items">The items. Do not pass null.</param>
 /// <param name="setup">The setup object for the list.</param>
 public InlineList(IEnumerable <ComponentListItem> items, ComponentListSetup setup = null)
 {
     children = (setup ?? new ComponentListSetup()).GetComponents(
         CssElementCreator.InlineListClass,
         from i in items select i.GetItemAndComponent(ElementClassSet.Empty, null, includeContentContainer: true));
 }