Files
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

1.8 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Create Vertical Text 03/30/2017
csharp
vb
text [Windows Forms], drawing vertical
Windows Forms, drawing vertical text
strings [Windows Forms], drawing vertical
vertical text [Windows Forms], drawing
50c69046-4188-47d9-b949-cc2610ffd337

How to: Create Vertical Text

You can use a xref:System.Drawing.StringFormat object to specify that text be drawn vertically rather than horizontally.

Example

The following example assigns the value xref:System.Drawing.StringFormatFlags.DirectionVertical to the xref:System.Drawing.StringFormat.FormatFlags%2A property of a xref:System.Drawing.StringFormat object. That xref:System.Drawing.StringFormat object is passed to the xref:System.Drawing.Graphics.DrawString%2A method of the xref:System.Drawing.Graphics class. The value xref:System.Drawing.StringFormatFlags.DirectionVertical is a member of the xref:System.Drawing.StringFormatFlags enumeration.

The following illustration shows the vertical text:

Graphic that shows vertical font text.

[!code-csharpSystem.Drawing.FontsAndText#31] [!code-vbSystem.Drawing.FontsAndText#31]

Compiling the Code

See also