We have addressed the question in the support ticket that you have opened about the same topic. I am pasting the answer here in case there are other people interested in the answer:
This line of pixels would happen if your context menu is empty. Could you please make sure that you are filling the menu with items?
Instead of the approach that you are currently following, I would recommend handling the ContextMenuOpening event where you can have greater control over the behavior of the context menus. The Node property of the event arguments will return the node for which the context menu is clicked, so you again will be able to achieve your scenario.
Please note that in order to make the ContextMenuOpening event fire, you need to set the AllowDefaultContext menu to true:
And this could be the ContextMenuOpening implementation:
sender, TreeViewContextMenuOpeningEventArgs e)
(e.Node.Level == 1)
"My Menu Item"
A bit off topic, I would kindly ask you to avoid double posting one and the same question as this may slow down our response and may lead to confustion. In case you require a quick answer according to your license, please directly open a new support ticket. Thank you for your understanding.
the Telerik team