I am trying to perform some actions on ribbon. I want to show something against mouse over event. I only found Mouse Enter Element action listener but can’t access the exact element where mouse pointer is currently exists.
Any idea??
HI somay,
try using the the MouseEnterElement event args
e.element.ToString() will tell you what element your mouse is over. This event arg has many propeties.
Here is a help link to the event
http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/Infragistics2.Win.v8.1~Infragistics.Win.UltraComponentControlManagerBase~MouseEnterElement_EV.html
Here is a help link to the event arguments:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/Infragistics2.Win.v8.1~Infragistics.Win.UIElementEventArgs_members.html
Hi, given that Win.UIElement, is there are way to tell exactly which ribbon tool it is over?
How can I determine the key for the item? The e.Element.ToString() for example just gives a rather unhelpful:
Infragistics.Win.ImageAndTextUIElement + ImageAndTextDependentUIElement
Any help would be appreciated.
Thanks
Robert
You can use the GetContext method of the uielement passing in a type of ToolBase. If you know the type of tool that you are looking for, you can limit this down to the that tool's type (e.g. ButtonToolUIElement). BTW, I think using e.Element.ToString was mentioned just as a way to see what element you are over while you are trying to figure out which element to look for; you wouldn't want to rely on ToString (not to mention the inefficiency of using string comparisons) in your production code. If your just looking to find out what tool you may be over (outside the MouseEnter/LeaveElement events) then you can use the UltraToolbarsManager's ToolFromPoint method - just make sure to pass in coordinates in screen coordinates and not the client coordinates of some control.