Exemplo n.º 1
0
        internal Row(IRowDefinition rowDefinition, object[] data)
        {
            this.rowDefinition = rowDefinition;
            this.data = new object[this.rowDefinition.ColumnCount];

            for (int k = 0; k < this.data.Length && k < data.Length; k++)
                this[k] = data[k];
        }
 public Row(IRowDefinition rowDefinition)
 {
     RowDefinition = rowDefinition;
     if (rowDefinition.Height.IsAbsolute)
     {
         Size = rowDefinition.Height.Value;
     }
 }
Exemplo n.º 3
0
        internal Row(IRowDefinition rowDefinition, object[] data)
        {
            this.rowDefinition = rowDefinition;
            this.data          = new object[this.rowDefinition.ColumnCount];

            for (int k = 0; k < this.data.Length && k < data.Length; k++)
            {
                this[k] = data[k];
            }
        }
        public static T RowDefinitions <T>(this T grid, params GridLength[] rowHeights) where T : IGrid
        {
            int length         = rowHeights.Length;
            var rowDefinitions = new IRowDefinition[length];

            for (int i = 0; i < length; ++i)
            {
                rowDefinitions[i] = RowDefinition().Height(rowHeights[i]);
            }

            grid.RowDefinitions.Set(rowDefinitions);
            return(grid);
        }