Programatically trigger "hover animation" for RadButton

6 posts, 0 answers
  1. Henrik Brinch
    Henrik Brinch avatar
    100 posts
    Member since:
    Aug 2004

    Posted 19 Oct 2007 Link to this post

    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
  2. Kiril
    Admin
    Kiril avatar
    158 posts

    Posted 22 Oct 2007 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 26 May 2010 Link to this post

    This solution is not working anymore (2010 Q1 SP2), is there a new way to accomplish this?
  5. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 28 May 2010 Link to this post

    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.
  6. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 29 May 2010 Link to this post

    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
  7. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 07 Jun 2010 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready