Skip to content →

Tag: UIElement

Detect whether the mouse is down in Silverlight

After recently searching for a way to do this and finding nothing I thought I would share a solution. It involves using the ever useful AddHandler method on the UIElement you wish to detect the mouse down on and simply setting a flag. Job done.

It is worth noting that popups and child windows may appear on top of the UIElement which the handler is attached to.

2 Comments