Edit this page

Accessing and Customizing Elements

Accessing and customizing elements can be performed either at design time, or at run time. Before proceeding with this topic, it is recommended to get familiar with the visual structure of the RadCheckBox.

Design time

You can access and modify the style for different elements in RadCheckBox by using the Element hierarchy editor. It can be accessed by selecting the Edit UI Elements item from the Smart Tag.

Figure 1: Element hierarchy editor

checkbox-customizing-appearance-accessing-and-customizing-elements 001


You can customize the nested elements at run time as well:

Figure 2: Customize elements

checkbox-customizing-appearance-accessing-and-customizing-elements 002

Customize elements

this.radCheckBox1.ButtonElement.TextElement.ForeColor = Color.Blue;
this.radCheckBox1.ButtonElement.CheckMarkPrimitive.CheckElement.ForeColor = Color.Blue;
this.radCheckBox1.ButtonElement.CheckMarkPrimitive.Border.ForeColor = Color.Red;
this.radCheckBox1.ButtonElement.CheckMarkPrimitive.Border.BoxStyle = Telerik.WinControls.BorderBoxStyle.SingleBorder;

Me.radCheckBox1.ButtonElement.TextElement.ForeColor = Color.Blue
Me.radCheckBox1.ButtonElement.CheckMarkPrimitive.CheckElement.ForeColor = Color.Blue
Me.radCheckBox1.ButtonElement.CheckMarkPrimitive.Border.ForeColor = Color.Red
Me.radCheckBox1.ButtonElement.CheckMarkPrimitive.Border.BoxStyle = Telerik.WinControls.BorderBoxStyle.SingleBorder

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article