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

Usage of RadMenuItemBase.Owner and RadElement.Tag properties

1 Answer 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris Marks
Top achievements
Rank 1
Chris Marks asked on 10 Aug 2007, 06:57 PM
Hi,
RadElement.Tag and RadMenuItemBase.Owner are both properties that are visible in a RadMenuItem and both take an object.  What is the common usage scenarios of both of these?
I'm looking to have available to me the associated UI object that was originally right-clicked on and am also looking for suggestions to wire that as well.

Thanks,
topher

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 13 Aug 2007, 02:20 PM
Hello Chris Marks,

RadElement.Tag property is an all-purpose public member and it could be used as needed in many custom scenarios. The RadMenuItemBase.Owner is much different - it returns a reference to the main menu element which could be of different type. In case of the RadMenu this is RadMenuElement which is the main menu element and is on top of the element's hierarchy.

As to the second question, you could use MouseDown and MouseUp events of RadElement to get the information about the clicked item. However, if you need to hook to an event that has a reference as parameter to the original sender (which is located somewhere in the hierarchy of the elements) of the event, you have to inherit the necessary RadElement. If your case is such, I would ask you to send us some more information, so we could provide you with an adequate solution.
 

All the best,
Georgi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Chris Marks
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or