예제 #1
0
        private static (WidgetsDataSubList, int) CreateRow(IWidget widget, int startIdx)
        {
            var(x, firstIndexOnSubList) =
                SumWidthsTilFit(widget.Children, startIdx, WidgetWidth(widget));

            var y = MaxHeightInSubList(widget.Children, startIdx, firstIndexOnSubList);

            var subL = new WidgetsDataSubList(x, y, startIdx,
                                              firstIndexOnSubList < 0 ? widget.Children.Count : firstIndexOnSubList);

            return(subL, firstIndexOnSubList);
        }
예제 #2
0
        private static (WidgetsDataSubList, int) CreateColumn(IWidget widget, int startIdx)
        {
            var(x, firstIndexOnSubList) =
                SumHeightsTilFit(widget.Children, startIdx, WidgetHeight(widget));

            var y = MaxWidthInSubList(widget.Children, startIdx, firstIndexOnSubList);

            var subL = new WidgetsDataSubList(y, x, startIdx,
                                              firstIndexOnSubList < 0 ? widget.Children.Count : firstIndexOnSubList);

            return(subL, firstIndexOnSubList);
        }
예제 #3
0
 private static float SubListHeight(WidgetsDataSubList w) => w.Height;
예제 #4
0
 private static float SubListWidth(WidgetsDataSubList w) => w.Width;