Label::FlatStyle Property
Gets or sets the flat style appearance of the label control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
| Exception | Condition |
|---|---|
| InvalidEnumArgumentException | The value assigned is not one of the FlatStyle values. |
When the FlatStyle property is set to FlatStyle.System, any values assigned to the ImageList, Image, ImageIndex, and ImageAlign properties are ignored. In addition, the TextAlign property ignores any property values that are not vertical property settings. Horizontally aligned settings of the TextAlign property are aligned to the top of the control. For example, if you set the TextAlign property to ContentAlignment.TopCenter, ContentAlignment.MiddleCenter, or ContentAlignment.BottomCenter, when the FlatStyle property is set to FlatStyle.System, the text in the Label control will be aligned to the top and center locations within the bounds of the control.
Available since 1.1
