CheckPrimitive
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
public CheckPrimitive()
Fields
public static RadProperty CheckPrimitiveStyleProperty
public static RadProperty CheckThicknessProperty
public static RadProperty DrawFillProperty
public static RadProperty HorizontalOffestProperty
public static RadProperty SquareHeightAdjustProperty
public static RadProperty SquareWidthAdjustProperty
public static RadProperty UseFixedCheckSizeProperty
public static RadProperty VerticalOffestProperty
Properties
Gets or sets a value indicating the style of the check box primitive.
public CheckPrimitiveStyleEnum CheckPrimitiveStyle { get; set; }
public ToggleState CheckState { get; set; }
Gets or sets a value that determines the checkmark thickness. Use this property only when UseFixedCheckSize property is set to false.
public int CheckThickness { get; set; }
Gets or sets a value indicating whether to draw the background.
public bool DrawFill { get; set; }
Gets or sets a value that determines how the checkmark position in Indeterminate will be adjusted horizontal (in pixels).
public int HorizontalOffest { get; set; }
Gets or sets a value that determines how the checkmark height in Indeterminate state will be adjusted (in pixels).
public int SquareHeightAdjust { get; set; }
Gets or sets a value that determines how the checkmark width in Indeterminate state will be adjusted (in pixels).
public int SquareWidthAdjust { get; set; }
Gets or sets a value that determines whether the checkmark size is fixed to 8;8 pixels.
public bool UseFixedCheckSize { get; set; }
Gets or sets a value that determines how the checkmark position in Indeterminate state will be adjusted vertical (in pixels).
public int VerticalOffest { get; set; }
Methods
Renders the radio button primitive using the specified graphics context with rotation and scaling support.
public override void PaintPrimitive(IGraphics graphics, float angle, SizeF scale)
The graphics context to use for rendering the radio button.
anglefloatThe rotation angle in degrees to apply during rendering.
scaleSizeFThe scaling factor to apply during rendering.
Overrides:
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.