public override Rect GetDockedRect(Size childSize, Margin margin, Alignments alignments) { var marginsCutout = margin.AsThickness(); var withoutMargins = OriginalRect.Deflate(marginsCutout); var finalRect = withoutMargins.AlignChild(childSize, Alignment.End, alignments.Vertical); AccumulatedOffset += childSize.Width; margin.Horizontal = margin.Horizontal.Offset(0, childSize.Width); return(finalRect); }
public override Rect GetDockedRect(Size childSize, Margin margin, Alignments alignments) { var marginsCutout = margin.AsThickness(); var availableRect = OriginalRect.Deflate(marginsCutout); var alignedRect = AlignToLeft(availableRect, childSize, alignments.Vertical); AccumulatedOffset += childSize.Width; margin.Horizontal = margin.Horizontal.Offset(childSize.Width, 0); return(alignedRect); }