Exemple #1
0
 /// <summary>
 /// Initialize a new <see cref="GridLayout"/> instance from the row definitions.
 /// The instance doesn't care about whether the definitions are rows or columns.
 /// It will not calculate the column or row differently.
 /// </summary>
 internal GridLayout([NotNull] RowDefinitions rows)
 {
     if (rows == null)
     {
         throw new ArgumentNullException(nameof(rows));
     }
     _conventions = rows.Count == 0
         ? new List <LengthConvention> {
         new LengthConvention()
     }
         : rows.Select(x => new LengthConvention(x.Height, x.MinHeight, x.MaxHeight)).ToList();
 }
Exemple #2
0
 private string GenerateScriptFromRowDefinitions()
 {
     return(string.Join(RowColumnScriptPartJoinDelimiter, CompactStringDefinition(RowDefinitions.Select(rd => RowColumnDefinition.FromRowDefinition(rd).ToString()))));
 }