ClassCheckPrimitive
Represents a primitive element that renders checkboxes with support for checked, unchecked, and indeterminate states.
Definition
Namespace:Telerik.WinControls.Primitives
Assembly:Telerik.WinControls.dll
Syntax:
public class CheckPrimitive : RadioPrimitive, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IPrimitive, IFillElement, IPrimitiveElement, IShapedElement
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementBasePrimitiveFillPrimitiveRadioPrimitiveCheckPrimitive
Implements:
Inherited Members
Constructors
CheckPrimitive()
Declaration
public CheckPrimitive()
Fields
CheckPrimitiveStyleProperty
Declaration
public static RadProperty CheckPrimitiveStyleProperty
Field Value
CheckThicknessProperty
Declaration
public static RadProperty CheckThicknessProperty
Field Value
HorizontalOffestProperty
Declaration
public static RadProperty HorizontalOffestProperty
Field Value
SquareHeightAdjustProperty
Declaration
public static RadProperty SquareHeightAdjustProperty
Field Value
SquareWidthAdjustProperty
Declaration
public static RadProperty SquareWidthAdjustProperty
Field Value
UseFixedCheckSizeProperty
Declaration
public static RadProperty UseFixedCheckSizeProperty
Field Value
VerticalOffestProperty
Declaration
public static RadProperty VerticalOffestProperty
Field Value
Properties
CheckPrimitiveStyle
Gets or sets a value indicating the style of the check box primitive.
Declaration
public CheckPrimitiveStyleEnum CheckPrimitiveStyle { get; set; }
Property Value
CheckState
Declaration
public ToggleState CheckState { get; set; }
Property Value
CheckThickness
Gets or sets a value that determines the checkmark thickness. Use this property only when UseFixedCheckSize property is set to false.
DrawFill
Gets or sets a value indicating whether to draw the background.
HorizontalOffest
Gets or sets a value that determines how the checkmark position in Indeterminate will be adjusted horizontal (in pixels).
SquareHeightAdjust
Gets or sets a value that determines how the checkmark height in Indeterminate state will be adjusted (in pixels).
SquareWidthAdjust
Gets or sets a value that determines how the checkmark width in Indeterminate state will be adjusted (in pixels).
UseFixedCheckSize
Gets or sets a value that determines whether the checkmark size is fixed to 8;8 pixels.
VerticalOffest
Gets or sets a value that determines how the checkmark position in Indeterminate state will be adjusted vertical (in pixels).
Methods
GetClientRect()
Declaration
protected override Rectangle GetClientRect()
Returns
Overrides
PaintPrimitive(IGraphics, float, SizeF)
Renders the radio button primitive using the specified graphics context with rotation and scaling support.
Declaration
public override void PaintPrimitive(IGraphics graphics, float angle, SizeF scale)
Parameters
graphics
The graphics context to use for rendering the radio button.
angle
The rotation angle in degrees to apply during rendering.
scale
The scaling factor to apply during rendering.
Overrides
Remarks
This method performs comprehensive radio button rendering including parameter validation, gradient color setup, and shape-based or rectangular rendering depending on configuration.
The rendering process supports up to 4 gradient colors and automatically handles different gradient styles, parent shape inheritance, and various radio button visual states.