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

Programatically trigger "hover animation" for RadButton

5 Answers 348 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Henrik Brinch
Top achievements
Rank 2
Henrik Brinch asked on 19 Oct 2007, 07:50 AM
I have a little unusual problem:

I want to trigger e.g. the hover animation of a RadButton programatically, without actually hovering the button with the mouse.   So before I reflect into the assembly I'd like to know if there's an easy way to accomplish this?

- Henrik

5 Answers, 1 is accepted

Sort by
0
Kiril
Telerik team
answered on 22 Oct 2007, 11:35 AM
Hello Henrik Brinch,

We put together a sample project which shows you how to achieve the desired behavior. You can find it attached to this email. Please remember the clean and rebuild the solution before running it.

Thank you for writing. Contact us again, if you need any further assistance.

Regards,
Kiril
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Emanuel Varga
Top achievements
Rank 1
answered on 26 May 2010, 10:09 AM
This solution is not working anymore (2010 Q1 SP2), is there a new way to accomplish this?
0
Nikolay
Telerik team
answered on 28 May 2010, 03:23 PM
Hello Emanuel Varga,

Thank you for the question.

In Q1 2010 we introduced our new styling mechanism and for Q1 2010 SP2 we reworked most of our predefined themes according to this mechanism. This change reflected on the way you need to put a RadButton in a MouseOver state. Please consider the following code snippet:
private static void ChangeMouseOverState(RadButton target)
{
    bool currentaValue = target.ButtonElement.ButtonFillElement.IsMouseOver;
    target.ButtonElement.IsMouseOver = !currentaValue;
}

Sincerely yours,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Emanuel Varga
Top achievements
Rank 1
answered on 29 May 2010, 09:31 AM
Hello Nikolay ,

Ok, this fixed the mouse over event, but I've noticed that i set some other colors to the gradient, the hover state will be barely visible.

I have to note that this still happen even if i set the gradient color to the default colors (copied all the colors) from another button. I can provide an example application if necessary

Sincerely,
Emanuel
0
Nikolay
Telerik team
answered on 07 Jun 2010, 07:25 AM
Hello Emanuel,

Thank you for getting back to us.

Please open a new support ticket and send me a sample project which demonstrates your case as I am not sure that I understand you correctly. This will allow me to provide you with further assistance.

Best wishes,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Henrik Brinch
Top achievements
Rank 2
Answers by
Kiril
Telerik team
Emanuel Varga
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or