Back to Devexpress

RepositoryItemCheckEdit.CheckStyle Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemcheckedit-26abceff.md

latest7.0 KB
Original Source

RepositoryItemCheckEdit.CheckStyle Property

Gets or sets what the checkbox looks like.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
[DefaultValue(CheckStyles.Standard)]
[DXCategory("Appearance")]
[EditorBrowsable(EditorBrowsableState.Never)]
public CheckStyles CheckStyle { get; set; }
vb
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
<DXCategory("Appearance")>
<DefaultValue(CheckStyles.Standard)>
Public Property CheckStyle As CheckStyles

Property Value

TypeDefaultDescription
CheckStylesStandard

A CheckStyles enumeration value specifying what the check box looks like.

|

Available values:

Show 19 items

NameDescription
Standard

The default mode (the appearance depends on the control’s look-and-feel) :

| | Radio |

A radio button (the appearance depends on the control’s look-and-feel):

In the Skin, Office 2003 and WindowsXP paint schemes, the Indeterminate and Unchecked check styles look the same.

| | Style1 |

Predefined custom style.

| | Style2 |

Predefined custom style.

| | Style3 |

Predefined custom style.

| | Style4 |

Predefined custom style.

| | Style5 |

Predefined custom style.

| | Style6 |

Predefined custom style.

| | Style7 |

Predefined custom style.

| | Style8 |

Predefined custom style.

| | Style9 |

Predefined custom style.

| | Style10 |

Predefined custom style.

| | Style11 |

Predefined custom style.

| | Style12 |

Predefined custom style.

| | Style13 |

Predefined custom style.

| | Style14 |

Predefined custom style.

| | Style15 |

Predefined custom style.

| | Style16 |

Predefined custom style.

| | UserDefined |

Allows you to customize the check box glyph using the RepositoryItemCheckEdit.ImageOptions property.

|

Remarks

Important

Use the CheckBoxOptions.Style property (RepositoryItemCheckEdit.CheckBoxOptions) to style a checkbox. The CheckStyle property supports backward compatibility. It is in effect if the CheckBoxOptions.Style property is set to Default.

Most styles started looking outdated and we made those enum values invisible, but they are still available in code. Read the following blog post for details: WinForms - New CheckEdit Styles.

The table below enumerates the available options.

CheckStyleCheckBoxOptions.Style
StandardCheckbox or Default
RadioRadio
UserDefinedCustom

The following code snippets (auto-collected from DevExpress Examples) contain references to the CheckStyle property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-grid-add-radio-group-column/CS/Helper/GridRadioGroupColumnHelper.cs#L95

csharp
{
    RadioRepositoryItem.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.Radio;
    RadioRepositoryItem.EditValueChanged += RadioRepositoryItem_EditValueChanged;

winforms-grid-display-icons-in-data-cells/VB/Form1.vb#L161

vb
checkEdit.PictureUnchecked = GetImageFromResource("Image1")
checkEdit.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.UserDefined
gridView1.Columns("CheckEdit").ColumnEdit = checkEdit

winforms-grid-add-radio-group-column/VB/Helper/GridRadioGroupColumnHelper.vb#L95

vb
Private Sub InitRepositoryItem()
    RadioRepositoryItem.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.Radio
    AddHandler RadioRepositoryItem.EditValueChanged, AddressOf RadioRepositoryItem_EditValueChanged

See Also

CheckBoxOptions

RepositoryItemCheckEdit Class

RepositoryItemCheckEdit Members

DevExpress.XtraEditors.Repository Namespace