예제 #1
0
        protected override void OnLayout(bool changed, int l, int t, int r, int b)
        {
            l = 0;
            t = 0;
            r = Width;
            b = Height;

            if (Header != null)
            {
                var headerHeight = Header.MeasuredHeight;
                Header.Layout(l, t, r, headerHeight);
                ItemTop = headerHeight;
                Item.Layout(l, headerHeight, r, b);
            }
            else if (Divider != null)
            {
                Divider.SetBounds(l, t, r, DividerHeight);
                ItemTop = DividerHeight;
                Item.Layout(l, DividerHeight, r, b);
            }
            else
            {
                ItemTop = t;
                Item.Layout(l, t, r, b);
            }
        }