public static Edge ToEdge(string propertyName)
{
if (propertyName == PropLeft) return Edge.Left;
if (propertyName == PropTop) return Edge.Top;
if (propertyName == PropRight) return Edge.Right;
if (propertyName == PropBottom) return Edge.Bottom;
throw new Exception(string.Format("Property '{0}' cannot be converted to an edge.", propertyName));
}