Siticone Logo
Siticone UI
DOCS
v2025.12.15
Docs CheckBox Container

Siticone CheckBox Container

The SiticoneCheckBoxContainer is a comprehensive, multi-element selectable control. Unlike a simple checkbox, this control acts as a full interactive card that can contain an image, a bold title, and a descriptive subtitle. It features built-in selection indicators (Radio, Checkbox) and can be grouped to enforce single-selection logic.

Content Configuration

Configure the three main visual elements: the hero image, the main title, and the supporting subtitle.

Property Type Description
Title string The primary bold text displayed in the container.
Subtitle string Secondary text displayed below or beside the title, usually smaller or lighter.
Image Image An optional image or icon. Its position is controlled by ImageAlignment.
ImageSize Size The dimensions to render the image (Default: 48x48).

Selection Logic & Grouping

The container includes a powerful group manager that handles radio-button behavior automatically.

Property Type Description
GroupName string Assign the same name to multiple containers to link them. When one is selected, others in the group are automatically deselected (if SelectionMode is One).
SelectionMode Enum One: Radio button behavior (only one per group).
Many: Checkbox behavior (multiple selections allowed).
RequireSelection bool If true, at least one item in the group must remain selected (prevents deselecting the last active item).
AutoSelectOnMouseEnter bool If true, hovering over the container automatically selects it (useful for wizard steps).

Visual Styling

Customize every aspect of the container's appearance for Normal, Hover, and Checked states.

Property Type Description
BorderColor Color Border color in the unchecked/idle state.
CheckedBorderColor Color Highlight color for the border when selected.
BackgroundColor Color Background fill color in the unchecked state.
CheckedBackgroundColor Color Background fill color when selected.
BorderRadius int Controls the roundness of the container corners.

Selection Indicator

The container can draw a visual mark (like a check or radio circle) to signify selection.

Property Type Description
IndicatorStyle Enum Radio (Circle), Checkbox (Square), TickOnly (Checkmark), or None.
IndicatorPosition Enum Corner position: TopLeft, TopRight, BottomLeft, BottomRight.
IndicatorSize int Size of the indicator icon in pixels.
IndicatorColor Color Fill color of the indicator when checked.

Events

Respond to user interaction.

CheckedChanged Event
// Fired when the Checked property changes.
cardOption.CheckedChanged += (s, e) => 
{
                if (e.IsChecked)
    {
                Console.WriteLine($"Selected: {e.GroupName} - {((SiticoneCheckBoxContainer)s).Title}");
    }
};

Usage Examples

Example 1: Payment Method Selector

Creating a radio-group of payment cards where only one can be selected.

C# - Payment Options
private void SetupPaymentCards()
{
                // Configure Card 1
    cardVisa.GroupName = "PaymentMethods";
    cardVisa.SelectionMode = ControlSelectionMode.One;
    cardVisa.Title = "Visa **** 4242";
    cardVisa.Subtitle = "Expires 12/25";
    cardVisa.Image = Properties.Resources.visa_logo;
    cardVisa.CheckedBorderColor = Color.DodgerBlue;
    
                // Configure Card 2
    cardMaster.GroupName = "PaymentMethods";
    cardMaster.SelectionMode = ControlSelectionMode.One;
    cardMaster.Title = "Mastercard **** 8888";
    cardMaster.Subtitle = "Expires 01/24";
    cardMaster.Image = Properties.Resources.mastercard_logo;
    cardMaster.CheckedBorderColor = Color.Orange;
}

Example 2: Multi-Select Features

A list of add-on features where users can pick multiple items.

C# - Feature List
private void SetupAddons()
{
                var addon = new SiticoneCheckBoxContainer();
    
                // Enable multiple selection
    addon.SelectionMode = ControlSelectionMode.Many;
    
                // Visuals
    addon.Title = "Priority Support";
    addon.Subtitle = "+$5.00/mo";
    addon.IndicatorStyle = SelectionIndicatorStyle.Checkbox;
    addon.IndicatorPosition = RadioButtonPosition.TopRight;
    
                // Add to form
    flowPanel1.Controls.Add(addon);
}

Example 3: Error State

Triggering an error visual (e.g., red flash) when validation fails.

C# - Error Feedback
private void ValidateSelection()
{
                if (!cardTerms.Checked)
    {
                // Flash red to indicate error
        cardTerms.TriggerError(Color.Red, Color.MistyRose);
                MessageBox.Show("You must accept the terms.");
    }
}

Example 4: Custom Image Layout

Changing the image position to create different card layouts (e.g., a horizontal row).

C# - Image Layout
private void ConfigureHorizontalLayout()
{
    userCard.ImageAlignment = ContentAlignment.MiddleLeft;
    userCard.ImageSize = new Size(64, 64);
    userCard.ImagePadding = 15;
    
                // Ensure text doesn't overlap image
    userCard.TextPadding = 10; 
    
    userCard.Title = "John Doe";
    userCard.Subtitle = "Administrator";
}