c# - How to vertical text alignment for formattedtext? -
Is it possible to set the formatted text vertical text alignment in C # for example my formatted text
var formattedtext = new formatted text ("some string", culture info. Contentculture, system.indust.flow direction.liftautoite, this .gate typeface (), 12.0, brush.black); I need to align the formatted text in the vertical alignment center in the specialty area. I
You can try something like this:
// e PaintEventArgs, which has been passed as a parameter // creating a new rectangle . Rectangle display area = new rectangle (new point (40, 40), new shape (80, 80)); // Create new string formatted object var format = new string format (stringformattlag.directitative); // format.LineAlignment = Set LineAlignment and Alignment Properties for StringAlignment.Near; Format.Alignment = StringAlignment.Center; // Drag a string for border rectangular and stringformate objects. E.Graphics.DrawRectangle (Pens.Black, displayRectangle); E.Graphics.DrawString ("Showing Formats", This fonts, Brushes.Read, (RectangleF) DisplayEctengel, Format);
Comments
Post a Comment