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

RadMenuItem hover

2 Answers 188 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Roman
Top achievements
Rank 1
Roman asked on 21 Jul 2014, 08:01 AM
RadMenu contains several RadMenuItems. When I click on RadMenuItem and move the mouse pointer to another RadMenuItem, is the opening RadMenuItem. But I do not need that would hover on the other it does not open RadMenuItem.

2 Answers, 1 is accepted

Sort by
0
Shanti 😎
Top achievements
Rank 2
Veteran
answered on 30 Jan 2020, 11:01 AM
For Each item As RadMenuItem In RadDropDownButton1.Items
            item.TextAlignment = ContentAlignment.MiddleLeft
            item.Padding = New Padding(7)
            item.Font = New Font("Segoe UI", 10.5, FontStyle.Regular)
            item.BorderPrimitive.Visibility = ElementVisibility.Collapsed

            AddHandler item.MouseEnter, AddressOf Item_MouseEnter
            AddHandler item.MouseLeave, AddressOf Item_MouseLeave
Next

 Private Sub Item_MouseEnter(sender As Object, e As EventArgs)
        TryCast(TryCast(sender, RadMenuItem).Children(0), Primitives.FillPrimitive).BackColor = Color.FromArgb(135, 142, 147)
 End Sub

 Private Sub Item_MouseLeave(sender As Object, e As EventArgs)
        TryCast(TryCast(sender, RadMenuItem).Children(0), Primitives.FillPrimitive).BackColor = Color.FromArgb(112, 121, 128)
 End Sub
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 30 Jan 2020, 02:51 PM
Hello, Shanti,   

I have noticed that you provided a sample code snippet in a very old forum post. It seems to change the color of the menu item when you hover it.

However, it is not clear whether you are experiencing any difficulties with this piece of code. Do you need any assitance in achieving a certain requirement that you have?

I am looking forward to your reply.

 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Menu
Asked by
Roman
Top achievements
Rank 1
Answers by
Shanti 😎
Top achievements
Rank 2
Veteran
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or