/// <summary> /// Converts a HorizontalAlignment value to a StringFormat value. /// </summary> /// <param name="alignment">A HorizontalAlignment value to convert.</param> /// <returns>The StringFormat representation of the HorizontalAlignment value.</returns> public static StringFormat StringFormat(HorizontalAlignment alignment, bool multiline) { // Determine text format (based on TextAlignment) System.Drawing.StringFormat format = CustomGraphics.StringFormat(alignment); if (multiline) { format.LineAlignment = StringAlignment.Near; } return(format); }
/// <summary> /// ... /// </summary> /// <param name="graphics"></param> /// <param name="rectangle"></param> /// <param name="borderStyle"></param> public static void DrawControlBorder(Graphics graphics, Rectangle rectangle, BorderStyle borderStyle) { CustomGraphics.DrawControlBorder(graphics, rectangle, borderStyle, SystemColors.WindowFrame); }