๐น Kt-RadioBox
Overview
KtRadioBox is a stylish radio button control that enables mutually exclusive selections within a group. With intuitive customization options, smooth rendering, and label binding capabilities, it provides a modern alternative to standard radio buttons for Windows Forms applications.
Key Properties
Checked
bool
false
Gets or sets whether the radio button is selected
RadioColor
KtColor
PRIMARY
Inner fill color when checked
OutlineColor
KtColor
PRIMARY
Outline color when checked
OutlineColorUnchecked
KtColor
PRIMARY
Outline color when unchecked
RadioColorTabFocused
KtColor
PRIMARY
Inner fill color when focused
OutlineColorTabFocused
KtColor
PRIMARY
Outline color when focused
BorderThickness
int
2
Thickness of the outline border
BindingControl
Control
null
Control to bind with the radio button (typically a Label)
BindingControlPosition
BindingControlPositions
Right
Position of bound control (Left or Right)
AllowBindingControlLocation
bool
false
Auto-positions bound control relative to radio button
Events
CheckedChanged
EventArgs
Fires when the Checked property changes
CheckedChanged2
CheckedChangedEventArgs
Extended event with checked state information
BindingControlChanged
BindingControlChangedEventArgs
Fires when bound control changes
BindingControlPositionChanged
PositionChangedEventArgs
Fires when bound control position changes
Basic Usage
Simple Radio Button
Radio Button with Label
Styling Examples
Custom Colors
Custom Border Thickness
Focus States
Radio Button Groups
Creating Mutually Exclusive Groups
Radio buttons automatically work together when placed in the same container:
Separate Groups with Panels
Common Patterns
Settings Selection
Survey/Questionnaire Pattern
Payment Method Selection
Getting Selected Value
Using Tag Property for Value Storage
Advanced Features
Programmatic Selection
Keyboard Navigation
Focus Management
Dynamic Group Creation
Label Binding Features
Automatic Label Positioning
Left-Aligned Labels
Manual Label Positioning
Validation and Error Handling
Design Tips
Consistent Sizing: Keep radio buttons at 21x21 or scale proportionally (Height automatically matches Width)
Group Organization: Use panels to create distinct radio button groups
Color Coding: Use different colors for different types of selections
Clear Labels: Always provide descriptive labels for each option
Default Selection: Consider pre-selecting the most common option
Focus States: Customize focus colors for better keyboard navigation feedback
Spacing: Maintain consistent vertical spacing (30-35px) between options
Accessibility Features
Automatic mutual exclusion within the same container
Keyboard navigation support (Space/Enter keys)
Focus state visualization
Accessible role support for bound controls
Cursor change to hand pointer on hover
Clear visual distinction between checked/unchecked states
Performance Notes
Radio buttons automatically manage sibling selections
Only one radio button can be checked per parent container
Use
Tagproperty to store associated valuesGroup related radio buttons in panels for better organization
Enumerations
BindingControlPositions
Migration Notes
If migrating from standard RadioButton:
Last updated
Was this helpful?