Monday, March 26, 2012

WP7: Button MouseDown and Rotate

Interesting that the Button control in silverlight does not support mousedown event.
however, to capture touch down event on the button, has to change the ClickMode of the Button control to "Press" instead of "Release"
and then capture the mousedown event using the "Click" event

Reference: http://www.silverlightshow.net/items/Tip-How-to-handle-the-MouseLeftButtonDown-and-MouseLeftButtonUp-events-of-the-Button-control.aspx

Rotation done using the following:
<Button.RenderTransform>
   <RotateTransform Angle="180" CenterX="100" CenterY="25"/>
</Button.RenderTransform>

No comments: