Skip to main content

CheckBoxGlyphOptions.Style Property

Gets or sets the checkbox glyph style. Set this property to a value from the GlyphStyle enumeration to change the checkbox glyph style.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v23.2.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

[DefaultValue(GlyphStyle.StandardBox1)]
public GlyphStyle Style { get; set; }

Property Value

Type Default
GlyphStyle StandardBox1

Available values:

Show 11 items
Name Description
StandardBox1

The StandardBox1 checkbox glyph style

StandardBox2

The StandardBox2 checkbox glyph style

YesNoBox

The YesNoBox checkbox glyph style

YesNoSolidBox

The YesNoSolidBox checkbox glyph style

YesNo

The YesNo checkbox glyph style

RadioButton

The RadioButton checkbox glyph style

Smiley

The Smiley checkbox glyph style

Thumb

The Thumb checkbox glyph style

Toggle

The Toggle checkbox glyph style

Star

The Star checkbox glyph style

Heart

The Heart checkbox glyph style

Property Paths

You can access this nested property as listed below:

Object Type Path to Style
XRCheckBox
.GlyphOptions .Style

Remarks

The following glyph styles are available:

xrCheckBox-Alignments

Example

The code sample below illustrates how to create a checkbox with the glyph set to the Thumb style.

using DevExpress.XtraReports.UI;
using DevExpress.XtraPrinting.Drawing;
using DevExpress.XtraPrinting;
// ...
public XRCheckBox CreateXRCheckBox() {
    // Create an XRCheckBox object.
    XRCheckBox xrCheckBox1 = new XRCheckBox();

    // Set the glyph size
    xrCheckBox1.GlyphOptions.Size = new SizeF(18, 18);
    // Set the glyph style
    xrCheckBox1.GlyphOptions.Style = DevExpress.XtraPrinting.GlyphStyle.Thumb;
    // Align the glyph to the right
    xrCheckBox1.GlyphOptions.Alignment = DevExpress.Utils.HorzAlignment.Far;

    // Add a glyph image for the Checked state
    xrCheckBox1.GlyphOptions.CustomGlyphs[CheckBoxState.Checked] = ImageSource.FromFile(".\\checkbox-checked.svg");
    // Add a glyph image for the Unchecked state
    xrCheckBox1.GlyphOptions.CustomGlyphs[CheckBoxState.Unchecked] = ImageSource.FromFile(".\\checkbox-unchecked.svg");
    // Add a glyph image for the Indeterminate state
    xrCheckBox1.GlyphOptions.CustomGlyphs[CheckBoxState.Indeterminate] = ImageSource.FromFile(".\\checkbox-indeterminate.svg");

    return xrCheckBox1;
}
See Also