Exemple #1
0
        private List <Row> GetRows(bool considerStarAsAuto)
        {
            if (RowDefinitions.InnerList.Count == 0)
            {
                var sizes = (VerticalAlignment == VerticalAlignment.Stretch || !double.IsNaN(Height)) ?
                            __singleStarSize :
                            __singleAutoSize;

                return(sizes.SelectToList(s => CreateInternalRow(considerStarAsAuto, s)));
            }
            else
            {
                return(RowDefinitions.InnerList
                       .SelectToList(rd => CreateInternalRow(considerStarAsAuto, GridSize.FromGridLength(rd.Height))));
            }
        }
Exemple #2
0
        private List <Column> GetColumns(bool considerStarAsAuto)
        {
            if (ColumnDefinitions.InnerList.Count == 0)
            {
                var sizes = (HorizontalAlignment == HorizontalAlignment.Stretch || !double.IsNaN(Width)) ?
                            __singleStarSize :
                            __singleAutoSize;

                return(sizes.SelectToList(size => CreateInternalColumn(considerStarAsAuto, size)));
            }
            else
            {
                return(ColumnDefinitions.InnerList
                       .SelectToList(cd => CreateInternalColumn(considerStarAsAuto, GridSize.FromGridLength(cd.Width))));
            }
        }