Recently we had the need to transform System.Drawing.ContentAlignment property to System.Drawing. Stringformat alignment property for creating a Graphic object with text drawn on it inside a given rectangle. Assuming that you want the text printed from left to right, you can use the ContentAlignment Enum values to obtain the desired StringAlignment Enum value. For example: