public override bool EvalTransparentPaint(ViewContext context)
{
Debug.Assert(context != null);
// Check with the base canvas first
if (base.EvalTransparentPaint(context))
return true;
// If drawing the other elements over the top of the border
// then we need to check each element as any of them could
// have an impact on the transparent drawing.
if (!DrawBorderLast)
{
// Check each child that is docked against an edge
foreach (ViewBase child in this.Reverse())
{
// Only position visible children
if (child.Visible)
{
switch(GetDock(child))
{
case ViewDockStyle.Top:
case ViewDockStyle.Bottom:
case ViewDockStyle.Left:
case ViewDockStyle.Right:
if (child.EvalTransparentPaint(context))
return true;
break;
}
}
}
}
// Could not find anything that needs transparent painting
return false;
}