tags:

views:

21

answers:

1

I am creating my own control from derived from drawingvisual class and drawn a rectangle. I want to enable mouse events for this object. how can I achieve this? I thing implementing IInputElement interface might be the solution. Could you guys suggest me how to implement this interface.

Thanks in advance

A: 

The DrawingVisual class doesn't offer any mouse events, and according to MSDN the IInputElement interface is "not intended to be implemented in application or framework-building scenarios."

Maybe you would be better deriving from UserControl and using DrawingVisual to provide visual content for it?

Val