/// <summary>
 /// Creates a line-list item from this general list item. If you don't need to pass any arguments, don't use this method; general list items are implicitly
 /// converted to line-list items.
 /// </summary>
 /// <param name="item"></param>
 /// <param name="verticalAlignment">The vertical alignment of the item.</param>
 /// <param name="width">The width of the item.</param>
 public static LineListItem ToLineListItem(
     this ComponentListItem item, FlexboxVerticalAlignment verticalAlignment = FlexboxVerticalAlignment.NotSpecified, ContentBasedLength width = null) =>
 new LineListItem(() => item.GetItemAndComponent(FlexboxVerticalAlignmentStatics.Class(verticalAlignment), width));
Пример #2
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 wrapping-list item from this general list item. If you don't need to pass any arguments, don't use this method; general list items are
 /// implicitly converted to wrapping-list items.
 /// </summary>
 /// <param name="item"></param>
 /// <param name="verticalAlignment">The vertical alignment of the item.</param>
 /// <param name="width">The width of the item.</param>
 public static WrappingListItem ToWrappingListItem(
     this ComponentListItem item, FlexboxVerticalAlignment verticalAlignment = FlexboxVerticalAlignment.NotSpecified, ContentBasedLength width = null)
 {
     return(new WrappingListItem(() => item.GetItemAndComponent(FlexboxVerticalAlignmentStatics.Class(verticalAlignment), width)));
 }