{
if (heightMeasureSpec.Mode != MeasureSpecification.ModeType.Exactly)
{
- totalHeight = Owner.GetHeightForWidth(totalWidth);
+ var padding = Owner.Padding;
+ totalHeight = Owner.GetHeightForWidth(totalWidth - (padding.Start + padding.End));
heightMeasureSpec = new MeasureSpecification(new LayoutLength(totalHeight), MeasureSpecification.ModeType.Exactly);
}
}
else
{
float width = naturalSize != null ? naturalSize.Width : 0;
- float height = naturalSize != null ? naturalSize.Height : 0;
// Since priority of MinimumSize is higher than MaximumSize in DALi, here follows it.
totalWidth = Math.Max(Math.Min(width, maxWidth < 0 ? Int32.MaxValue : maxWidth), minWidth);
+
+ var padding = Owner.Padding;
+ float height = Owner.GetHeightForWidth(totalWidth - (padding.Start + padding.End));
totalHeight = Math.Max(Math.Min(height, maxHeight < 0 ? Int32.MaxValue : maxHeight), minHeight);
heightMeasureSpec = new MeasureSpecification(new LayoutLength(totalHeight), MeasureSpecification.ModeType.Exactly);