System.Windows.Forms.ButtonBase.FlatStyle Property

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

Syntax

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

Value

Documentation for this section has not yet been entered.

Remarks

When the ButtonBase.FlatStyle property of the System.Windows.Forms.RadioButton and System.Windows.Forms.CheckBox classes is set to System, the control is drawn by the user's operating system and the check alignment is based upon the CheckAlign and ButtonBase.TextAlign property values. The CheckAlign property value is not changed, but the appearance of the control can be affected. The check box is horizontally aligned with either the left or right edge of the control (a left or center alignment appears left aligned, right remains unchanged), and vertically aligned the same as the descriptive text. For example, if you have a System.Windows.Forms.CheckBox control with a CheckAlign property value of ContentAlignment. MiddleCenter, a ButtonBase.TextAlign property value of ContentAlignment.TopRight, and the ButtonBase.FlatStyle property value is set to System, the check box alignment will appear to be ContentAlignment.TopLeft while the text alignment remains unchanged.

Note:

If the ButtonBase.FlatStyle property is set to FlatStyle.System, any images assigned to the ButtonBase.Image property are not displayed.

Requirements

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