Hi Jaroslav Bucek,
Thank you for getting back to me.
You could add a property of type RadContextMenu
in the descendant class and set all buttons to point to one context menu.
As an alternative solution, you could process the OnMouseDown
method of the RadPanelBar
and check the coordinates to find the correct button. This can be done by using the GetElementAtPoint
method. Consider the code below:
|RadElement element = mycontrol.ElementTree.GetElementAtPoint(e.Location);
|if (element is RadToggleButtonElement)
We will consider adding support for context menus in RadButtonElement
in one of our upcoming releases.
Currently there is no SourceControl
property in RadContextMenu
. This is a good feature and I will log it in our feature requests. I agree, that using the Tag
property is not the best way but it is a working option.
I hope this helps. Do not hesitate to write me if you have other questions.
the Telerik team
Check out Telerik Trainer
, the state of the art learning tool for Telerik products.