RadCheckBox
Represents a checkbox control that allows users to select or deselect an option. Inherits from RadToggleButton and wraps the RadCheckBoxElement for functionality.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadCheckBox : RadToggleButton, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, ISupportRootUIAutomation
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadButtonBaseRadToggleButtonRadCheckBox...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadCheckBox class. Creates a checkbox control with default settings and enables automatic sizing.
public RadCheckBox()
Properties
Gets or sets a value indicating whether the control is automatically resized to display its entire contents. This property is enabled by default for checkbox controls to ensure proper text display.
[Browsable(true)]
public override bool AutoSize { get; set; }
Overrides:
Gets the RadCheckBoxElement instance wrapped by this control. This element encapsulates the actual functionality and visual representation of the checkbox.
[Browsable(false)]
public RadCheckBoxElement ButtonElement { get; }
Gets or sets the alignment of the checkbox mark relative to the text content.
public ContentAlignment CheckAlignment { get; set; }
Gets or sets a value indicating the checked state of the checkbox. This property provides compatibility with standard checkbox controls and maps to the toggle state functionality.
[Bindable(true)]
public bool Checked { get; set; }
Gets the default size of the checkbox control when no explicit size is specified.
protected override Size DefaultSize { get; }
Overrides:
Gets or sets the font used to display text in the checkbox control. This property affects both the control and its underlying button element.
public override Font Font { get; set; }
Overrides:
Gets or sets a value indicating whether mnemonics are used for keyboard navigation. When enabled, users can activate the checkbox using Alt + the mnemonic character.
public bool UseMnemonic { get; set; }
Methods
Handles the toggle state changed event from the underlying button element and notifies about property changes.
protected override void ButtonElement_ToggleStateChanged(object sender, StateChangedEventArgs args)
The source of the event
argsStateChangedEventArgsThe StateChangedEventArgs containing event data
Overrides:
Handles the toggle state changing event from the underlying button element.
protected override void ButtonElement_ToggleStateChanging(object sender, StateChangingEventArgs args)
The source of the event
argsStateChangingEventArgsThe StateChangingEventArgs containing event data
Overrides:
Determines whether the control defines theme settings for the specified element. This method is used by the theming infrastructure to apply appropriate themes to child elements.
public override bool ControlDefinesThemeForElement(RadElement element)
The element to check for theme definition.
Returns:true if this control defines the theme for the element; otherwise, false.
Overrides:
Creates an accessibility object for the checkbox control to support screen readers and accessibility tools.
protected override AccessibleObject CreateAccessibilityInstance()
A new accessibility object instance if accessibility is enabled; otherwise, the base accessibility object
Overrides:
Creates the main button element specific for RadCheckBox functionality.
protected override RadButtonElement CreateButtonElement()
A new instance of RadCheckBoxElement that encapsulates the checkbox functionality
Overrides:
Handles theme change events and applies Material theme specific settings if applicable.
protected override void OnThemeChanged()
Overrides:
Handles the check state changing event and raises the appropriate event.
protected override void res_CheckStateChanging(object sender, CheckStateChangingEventArgs args)
The source of the event
argsCheckStateChangingEventArgsThe CheckStateChangingEventArgs containing event data
Overrides:
Handles property changed events and notifies about IsChecked property changes.
protected override void res_PropertyChanged(object sender, PropertyChangedEventArgs e)
The source of the event
ePropertyChangedEventArgsThe PropertyChangedEventArgs containing event data
Overrides:
Sets theme overrides for the BackColor property across all visual states of the button element.
protected override void SetBackColorThemeOverrides()
Overrides: