I need to port an Android app which has a widget to WP8.
For this I need to create my own toggle button (user control). So I just created a subclass of Button called MyToggleButton and use the standard callbacks to change the image and the text of the button.
To catch the click down I use onMouseEnter and when the click is finished, ie the moud button goes up again I use onMouseLeave
Wihle this works without problems – the issue is that when clicking the onMouseEnterseems to be called with a little delay and this button changes the ButtonImage with a minimal delay as opposed to a normal button ( I am using Visual Studio Express 2012 with Emulator since I do not yet have a real phone for testing)
WHile I found other ways of creating user controls specifing lots in XAML, however I find the described way of just using the standard methods easier. I am just not sure, where this minimal delay comes from.
Here is a simplified “Toggle” button using images. based on
CheckBox