संपादित करें

इसके माध्यम से साझा किया गया


Label.FlatStyle Property

Definition

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

Property Value

One of the FlatStyle values. The default value is Standard.

Exceptions

The value assigned is not one of the FlatStyle values.

Remarks

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.

Applies to