public static SizeF AddAlignedRegion( SizeF textSize, SizeF imageSize, TextImageRelation relation) { if (relation == TextImageRelation.Overlay) { return(new SizeF(Math.Max(textSize.Width, imageSize.Width), Math.Max(textSize.Height, imageSize.Height))); } return(LayoutUtils.AddAlignedRegionCore(textSize, imageSize, LayoutUtils.IsVerticalRelation(relation))); }