How to handle the mouseleftbuttondown and mouseleftbuttonup events of the button control?
Have you ever noticed thatMouseleftbuttondownAndMouseleftbuttonupEvents are not fired when a Silverlight button is clicked? The reason for this is that the button handles these two events itself by overridingOnmouseleftbuttondownAndOnmouseleftbuttonupHandlers. InOnmouseleftbuttondownOverride,ClickEvent is raised andMouseleftbuttondownEvent is marked as handled so it couldn't bubble in the visual tree.OnmouseleftbuttonupOverride also marksMouseleftbuttonupAs handled.
This thing can be changed usingClickmodeProperty of the button control. It has the following values-Hover, press, release. The default one isPressedAnd we have already explained it. When we have clickmode setRelease,ClickEvent will be raised inOnmouseleftbuttonupOverride andMouseleftbuttondownAndMouseleftbuttonupEvents will be handled inside the button again. If we setClickmodeToHover,ClickEvent will be raised withMouseenterEvent and we will also be able to use the mouse button events.
From: http://www.silverlightshow.net/tips/Tip-How-to-handle-the-MouseLeftButtonDown-and-MouseLeftButtonUp-events-of-the-Button-control.aspx