RadButton GradientStyle change color

2 posts, 0 answers
  1. Denis
    Denis avatar
    9 posts
    Member since:
    Mar 2014

    Posted 26 Mar 2014 Link to this post

    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?
  2. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 31 Mar 2014 Link to this post

    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.

     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top