This is a migrated thread and some comments may be shown as answers.

Change CheckBox style while the control activate

3 Answers 456 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
miki
Top achievements
Rank 1
miki asked on 31 Dec 2014, 03:18 PM
I have RadCheckBox and i am using TelerikMetroBlue theme.
All i want to do is to change CheckBox style while the control activate, please see my attach file.

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 02 Jan 2015, 11:43 AM
Hello Miki,

Thank you for writing.

There are two ways to customize the appearance of our controls: by using a theme or by setting the desired properties programatically.

To achieve this appearance of the check box when checked, here is how to access the check mark primitive and set its properties:
radCheckBox1.ButtonElement.CheckMarkPrimitive.CheckElement.DrawFill = true;
radCheckBox1.ButtonElement.CheckMarkPrimitive.CheckElement.BackColor = Color.FromArgb(27, 161, 226);
radCheckBox1.ButtonElement.CheckMarkPrimitive.CheckElement.BackColor2 = Color.FromArgb(27, 161, 226);
radCheckBox1.ButtonElement.CheckMarkPrimitive.CheckElement.ForeColor = Color.FromArgb(27, 161, 226);

The same result can be obtained with a theme. You can create your own theme, or you can use one of the predefined themes and change the appearance of the desired controls/elements. Then you can apply this theme to your application. More information about the theming mechanism is available on the following links:

Visual Style Builder
Working with Repository Items
Loading predefined themes
Saving and Loading Theme Files
Loading Themes from an External File
Loading Themes from a Resource
Applying theme to a control


I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
miki
Top achievements
Rank 1
answered on 02 Jan 2015, 07:28 PM
Thanks a lot for your help.
Please take a look at the attach screenshot, i want to change the regular style (not mouse over but just the controller style without any user click), currently the regular style is with black border and White color inside the button.
How can i change this regular style like the second Checkbox in my screenshot ?
I try to play with radCheckBoxLoop.ButtonElement.BorderElement properties but this default style haven't changed.
0
Stefan
Telerik team
answered on 05 Jan 2015, 09:25 AM
Hi,

Here is how to access the fill and border elements of the check mark:
radCheckBox1.ButtonElement.CheckMarkPrimitive.Fill.BackColor = Color.Yellow;
radCheckBox1.ButtonElement.CheckMarkPrimitive.Fill.GradientStyle = GradientStyles.Solid;
radCheckBox1.ButtonElement.CheckMarkPrimitive.Border.ForeColor= Color.Green;

I hope that you find this information useful.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
miki
Top achievements
Rank 1
Answers by
Stefan
Telerik team
miki
Top achievements
Rank 1
Share this question
or