I have a button whose ClickMode is initially set to “Press”. The code for the event handler for this button is as follows:
Button button_clicked = sender as Button;
if (button_clicked.ClickMode == ClickMode.Press)
{
button_clicked.ClickMode = ClickMode.Release;
button_clicked.Content = "Pressed";
}
else if (button_clicked.ClickMode == ClickMode.Release)
{
button_clicked.ClickMode = ClickMode.Press;
button_clicked.Content = "Released";
}
This should set the content of the button to “Pressed” when the button is first clicked. The content should remain as “Pressed” until the button is released and it should be set as “Released” as soon as the button is released.
But, the actual behaviour is different. When you click the button, the content is set to “Pressed”. Then if you hold it long enough (5-6 seconds, I guess), its content changes to “Released” even if you don’t release it and keep it pressed.
Edit: I’m using “Multi-touch vista” to simulate multi-touch on the emulator. This behaviour is observed when I run the emulator with Multi-touch vista. When I don’t use Multi-touch vista, it works fine. Any suggestions on how to get both working?
Please help me with this.
Thank you.
The conversation above indicates that this issue was actually a side effect from installing a multi-touch simulator.
Answering here to get this off the unanswered list.