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

RadButton GradientStyle change color

1 Answer 281 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Denis
Top achievements
Rank 1
Denis asked on 26 Mar 2014, 10:47 AM
Hello

Create a Radbutton  
Thema = Breeze
GradientStyle = Solid
BackColor = 153; 204; 255

Should I change the color - but after changing the color disappears focus on mouse over the button.

How to make that kept the focus on the button?

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 31 Mar 2014, 06:51 AM
Hello Denis,

Thank you for contacting us.

This is expected because setting the color in code overrides the theme and the color for the mouse over state is not changed. More information about how our theming functionality works can be found in the following articles:
This can be very easily overridden by using Visual Style Builder to change the color for the appropriate state. The attached image illustrates how you can change the button color. Also you may find the following articles very useful when you need to use Visual Style Builder:
Also you can handle this case in code. To do that you should subscribe to the MouseLeave and MouseEnter events:
void radButton1_MouseLeave(object sender, EventArgs e)
{
    radButton1.ButtonElement.ButtonFillElement.BackColor = Color.FromArgb(153, 204, 55);
}
 
void radButton1_MouseEnter(object sender, EventArgs e)
{
    radButton1.ButtonElement.ButtonFillElement.BackColor = Color.FromArgb(153, 204, 255);
}

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

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