Open.Core.Spacing.ToEdge C# (CSharp) Method

ToEdge() public static method

Converts the specified property-ref to an edge.
public static ToEdge ( string propertyName ) : Edge
propertyName string The name of the property.
return Edge
        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));
        }