internal static Grid.Layout.Cell Align(Grid.Layout.Cell cell, Grid.Layout.Alignment alignment, Grid.Layout.Direction direction) { if (direction.HasFlag(Grid.Layout.Direction.Horizontal)) { cell = cell.Horizontally(alignment); } if (direction.HasFlag(Grid.Layout.Direction.Vertical)) { cell = cell.Vertically(alignment); } return(cell); }
/// <summary> /// This is an alternative to using Vertically() and/or Horizontally() to set /// alignment. It sets one of both directions to Start. /// </summary> public static Grid.Layout.Cell AlignEnd(this Grid.Layout.Cell cell, Grid.Layout.Direction direction = Grid.Layout.Direction.Both) => Align(cell, Grid.Layout.Alignment.End, direction);
/// <summary> /// This is an alternative to using Vertically() and/or Horizontally() to set /// alignment. It sets one of both directions to Stretched. /// </summary> public static Grid.Layout.Cell AlignStretch(this Grid.Layout.Cell cell, Grid.Layout.Direction direction = Grid.Layout.Direction.Both) => Align(cell, Grid.Layout.Alignment.Stretched, direction);