Highlight split button on focused

2 posts, 0 answers
  1. Alex
    Alex avatar
    2 posts
    Member since:
    Dec 2009

    Posted 22 Sep 2011 Link to this post

    How can I highlight RadSplitButton to make it more visible  when focused. I tried setting up explicitly IsMouseOver = true on focus enter event, but it doesn't work. Is there any other way I can do it?

  2. Stefan
    Stefan avatar
    2911 posts

    Posted 27 Sep 2011 Link to this post

    Hello Alex,

    Thank you for writing.

    You can use a FocusPrimitive in order to notify your users when the button gets focused. Here is an example:
    FocusPrimitive focus;
    public Form1()
        BorderPrimitive border = new BorderPrimitive();
        border.ForeColor = Color.Red;
        focus = new FocusPrimitive(border);
        splitButton.GotFocus += new EventHandler(splitButton_GotFocus);
        splitButton.LostFocus += new EventHandler(splitButton_LostFocus);
    void splitButton_LostFocus(object sender, EventArgs e)
        focus.Visibility = ElementVisibility.Collapsed;
    void splitButton_GotFocus(object sender, EventArgs e)
        focus.Visibility = ElementVisibility.Visible;

    Feel free to customize the BorderPrimitive according to your needs.

    A bit off topic, I would like to remind you that your subscription package has expired, which means that you are not entitled to support services. I would highly recommend upgrading your license to the latest version in order to continue getting product updates and uninterrupted support services. Please, contact sales@telerik.com or visit your account for your upgrading options.

    I hope that you find this information helpful.
    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top