System.Windows.Forms.Label.FlatStyle Property

Gets or sets the flat style appearance of the label control.

Syntax

[System.ComponentModel.DefaultValue(System.Windows.Forms.FlatStyle.Standard)]
public FlatStyle FlatStyle { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When the Label.FlatStyle property is set to FlatStyle.System, any values assigned to the Label.ImageList, Label.Image, Label.ImageIndex, and Label.ImageAlign properties are ignored. In addition, the Label.TextAlign property ignores any property values that are not vertical property settings. Horizontally aligned settings of the Label.TextAlign property are aligned to the top of the control. For example, if you set the Label.TextAlign property to ContentAlignment.TopCenter, ContentAlignment.MiddleCenter, or ContentAlignment.BottomCenter, when the Label.FlatStyle property is set to FlatStyle.System, the text in the System.Windows.Forms.Label control will be aligned to the top and center locations within the bounds of the control.

Note:

In the .NET Framework version 1.1, setting the Label.FlatStyle property to FlatStyle.System does not cause the value of the Label.TextAlign property to be ignored. In addition, the property has no effect in the derived class, System.Windows.Forms.LinkLabel.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0