Class RadCheckBoxElement
Represents the visual element of a checkbox control that handles the rendering and behavior. Inherits from RadToggleButtonElement and provides checkbox-specific functionality.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadCheckBoxElement : RadToggleButtonElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IButtonControl, IImageElement
Constructors
RadCheckBoxElement()
Declaration
public RadCheckBoxElement()
Fields
CheckAlignmentProperty
Identifies the CheckAlignment dependency property that determines the alignment of the checkbox mark.
Declaration
public static RadProperty CheckAlignmentProperty
Field Value
RadProperty
|
Properties
CheckAlignment
Gets or sets the alignment of the checkbox mark relative to the text and content.
Declaration
[RadPropertyDefaultValue("CheckAlignment", typeof(RadCheckBoxElement))]
public ContentAlignment CheckAlignment { get; set; }
Property Value
System.Drawing.ContentAlignment
|
Checked
Gets or sets a value indicating whether the checkbox is in the checked state. This property provides a simple boolean interface to the underlying toggle state.
Declaration
public bool Checked { get; set; }
Property Value
System.Boolean
|
CheckMarkPrimitive
Gets the RadCheckmark instance that represents the visual checkmark element of the checkbox. This element handles the rendering of the check state indicator.
Declaration
public RadCheckmark CheckMarkPrimitive { get; }
Property Value
RadCheckmark
|
Methods
CreateChildElements()
Creates the child elements that compose the checkbox visual hierarchy including fill, border, text, image, and checkmark primitives.
Declaration
protected override void CreateChildElements()
Overrides
GetFocusRect()
Gets the rectangle that should be used for focus indication, typically the text element bounds.
Declaration
protected override Rectangle GetFocusRect()
Returns
System.Drawing.Rectangle
A System.Drawing.Rectangle representing the focus rectangle bounds |
Overrides
GetSystemSkinPaintBounds()
Gets the bounds rectangle for system skin painting, typically the checkmark area.
Declaration
protected override Rectangle GetSystemSkinPaintBounds()
Returns
System.Drawing.Rectangle
A System.Drawing.Rectangle representing the system skin paint bounds |
Overrides
GetXPVisualStyle()
Gets the appropriate Windows XP visual style element based on the current state of the checkbox.
Declaration
public override VisualStyleElement GetXPVisualStyle()
Returns
System.Windows.Forms.VisualStyles.VisualStyleElement
A System.Windows.Forms.VisualStyles.VisualStyleElement that represents the current checkbox state |
Overrides
InitializeFields()
Initializes the fields and sets default values for the checkbox element.
Declaration
protected override void InitializeFields()
Overrides
InitializeSystemSkinPaint()
Initializes system skin painting and applies system colors to text elements.
Declaration
protected override void InitializeSystemSkinPaint()
Overrides
ShouldPaintChild(RadElement)
Determines whether a child element should be painted based on system skin settings. Handles special rendering logic for the checkmark primitive when system skins are enabled.
Declaration
protected override bool ShouldPaintChild(RadElement element)
Parameters
RadElement
element
The child element to evaluate for painting |
Returns
System.Boolean
true if the element should be painted; otherwise, false |