public static string AnchorConvert(AnchorPoint anchor)
{
switch (anchor)
{
case AnchorPoint.TopLeft:
return "tl";
case AnchorPoint.Top:
return "t";
case AnchorPoint.TopRight:
return "tr";
case AnchorPoint.Left:
return "l";
case AnchorPoint.Center:
return "c";
case AnchorPoint.Right:
return "r";
case AnchorPoint.BottomLeft:
return "bl";
case AnchorPoint.Bottom:
return "b";
case AnchorPoint.BottomRight:
return "br";
default:
throw new ArgumentOutOfRangeException("anchor");
}
}
}