Label.FlatStyle Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the flat style appearance of the label control.
public:
property System::Windows::Forms::FlatStyle FlatStyle { System::Windows::Forms::FlatStyle get(); void set(System::Windows::Forms::FlatStyle value); };
public System.Windows.Forms.FlatStyle FlatStyle { get; set; }
member this.FlatStyle : System.Windows.Forms.FlatStyle with get, set
Public Property FlatStyle As FlatStyle
One of the FlatStyle values. The default value is Standard
.
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.
Note
In the .NET Framework version 1.1, setting the FlatStyle property to FlatStyle.System
does not cause the value of the TextAlign property to be ignored. In addition, the property has no effect in the derived class, LinkLabel.
Product | Versions |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: