New to Telerik UI for WinFormsStart a free 30-day trial

CheckPrimitive

Updated over 6 months ago

The CheckPrimitive is painted as three sets of angled lines and is colored using the ForeColor property. The three sets of lines are easier to see when the primitive is scaled up. The example below creates two CheckPrimitives, one at the default size and the second scaled up by a factor of 5.

tpf-primitives-checkprimitive 001

Creating a CheckPrimitive

C#
public class MyCheckPrimitiveElement : RadElement
{
    protected override void CreateChildElements()
    {
        BorderPrimitive borderPrimitive = new BorderPrimitive();
        borderPrimitive.BoxStyle = BorderBoxStyle.SingleBorder;
        borderPrimitive.Width = 1;
        borderPrimitive.GradientStyle = GradientStyles.Solid;
        borderPrimitive.MinSize = new Size(100, 100);
        borderPrimitive.ForeColor = Color.Blue;
        CheckPrimitive checkPrimitive = new CheckPrimitive();
        checkPrimitive.ForeColor = Color.Red;
        CheckPrimitive checkPrimitive2 = new CheckPrimitive();
        checkPrimitive2.ForeColor = Color.Green;
        checkPrimitive2.ScaleTransform = new SizeF(5F, 5F);
        this.Children.Add(borderPrimitive);
        this.Children.Add(checkPrimitive);
        this.Children.Add(checkPrimitive2);
        base.CreateChildElements();
    }
}

See Also

In this article
See Also
Not finding the help you need?
Contact Support