I can’t seem to get the Image on the display to respond to touch. It works in other software. I can see the touch down and up in the debug output but that window is not seeing it as the function to handle the touch doesn’t fire.
I have the following functions in Program.cs
private static void Touch_TouchUp(FT5xx6Controller sender, TouchEventArgs e)
{
if (touchState)
{
touchState = false;
Application.Current.InputProvider.RaiseTouch(e.X, e.Y, GHIElectronics.TinyCLR.UI.Input.TouchMessages.Up, DateTime.UtcNow);
Debug.WriteLine("Touch up");
}
}
private static void Touch_TouchDown(FT5xx6Controller sender, TouchEventArgs e)
{
if (!touchState)
{
touchState = true;
Application.Current.InputProvider.RaiseTouch(e.X, e.Y, GHIElectronics.TinyCLR.UI.Input.TouchMessages.Down, DateTime.UtcNow);
Debug.WriteLine("Touch down");
}
}
I then have this in the class that handles the UI
currentForecastImage.TouchUp += ForecastImage_TouchUp;
It’s as if the touch is not being passed to the class. This never gets called.