protected override void OnLayout(LayoutEventArgs levent)
{
// Cannot process a message for a disposed control
if (!IsDisposed)
{
// Do we have a manager to use for laying out?
if (ViewManager != null)
{
// Prevent infinite loop by looping a maximum number of times
int max = 5;
do
{
// Layout cannot now be dirty
_layoutDirty = false;
// Ask the view to peform a layout
ViewManager.Layout(Renderer);
} while (_layoutDirty && (max-- > 0));
}
}
// Let base class layout child controls
base.OnLayout(levent);
}