+void CustomLayout::MeasureChildren( Dali::Toolkit::Internal::LayoutItemPtr childLayout, MeasureSpec widthMeasureSpec, MeasureSpec heightMeasureSpec, LayoutLength resultingWidth, LayoutLength resultingHeight )
+{
+ // Initially use the measure spec of the child's parent
+ auto childWidthMeasureSpec = widthMeasureSpec;
+ auto childHeightMeasureSpec = heightMeasureSpec;
+
+ if ( true == GetCustomBehaviourFlags( Test::CustomLayout::BEHAVIOUR_FLAG_UNCONSTRAINED_CHILD_WIDTH ) )
+ {
+ // Use unspecified width measure spec, child can be any width it desires
+ childWidthMeasureSpec = MeasureSpec( widthMeasureSpec.GetSize(), MeasureSpec::Mode::UNSPECIFIED );
+ }
+
+ if ( true == GetCustomBehaviourFlags( Test::CustomLayout::BEHAVIOUR_FLAG_UNCONSTRAINED_CHILD_HEIGHT) )
+ {
+ // Use unspecified height measure spec, child can be any height it desires
+ childHeightMeasureSpec = MeasureSpec( heightMeasureSpec.GetSize(), MeasureSpec::Mode::UNSPECIFIED );
+ }
+
+ MeasureChild( childLayout, childWidthMeasureSpec, childHeightMeasureSpec );
+ resultingWidth += childLayout->GetMeasuredWidth();
+ resultingHeight = std::max( childLayout->GetMeasuredHeight(), resultingHeight );
+}
+