Пример #1
0
 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);
 }
Пример #2
0
 /// <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);
Пример #3
0
 /// <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);