MouseLeave LostFocus Silverlight Events

I am writing a Windows Phone 7 Silverlight Application. and I have to set the visibility of my Stackpanel to Collapsed when the mouse leaves this control. But this event happens even if I just click on my control without moving my mouse. Lost focus event doesn't work either. How can I achieve my goal? thanks in advance!

+2


a source to share


2 answers


LostFocus only fires when the user clicks on another control, as mentioned, there are no hover events as the mouse metaphor does not work here as this is a touch environment - the best way to handle control is to imagine using your finger to interact with the control - this can allow you to design a behavior that works the way you want and then see how it works in practice, touching the screen starts with a mouse click, so there is no muzmo without a mouse. / p>



+3


a source


If you are looking for a "mouse over" effect, you may need to rethink how the user interacts with your application, since MouseMove events are fired only when the user has a finger down on the screen.



+1


a source







All Articles