private Control BuildCollapsedRegion(BorderLayoutRegion region)
{
string template =
"<div class=\"x-layout-collapsed x-layout-collapsed-{0}\" style=\"position: static; visibility:visible;{1}\"><a {2}><div class=\"x-tool x-tool-expand-{0}\"></div></a></div>";
string style;
if (region.Region == RegionPosition.North || region.Region == RegionPosition.South)
{
style = "height:22px;width:auto;";
}
else
{
style = "height:100%;width:22px;";
}
LiteralControl res =
new LiteralControl(
string.Format(template, region.Region.ToString().ToLower(), style,
GetDesignerRegionAttribute(region.Region, BorderLayoutClickAction.Expand)));
this.AddEmptyRegion();
return res;
}