- // A measure just to get the size if the wrapped content
- childLayout->Measure( widthMeasureSpec, heightMeasureSpec );
- desiredWidth = childLayout->GetMeasuredWidth();
- desiredHeight = childLayout->GetMeasuredHeight();
- // Remove padding here since the second measure will add it back
- Extents padding = childLayout->GetPadding();
- desiredWidth = desiredWidth - padding.end - padding.start;
- desiredHeight = desiredHeight - padding.bottom - padding.top;