I have code for a WPF trigger that checks for double clicks:
private void HandleButtonUp(object sender, MouseButtonEventArgs mouseEventArgs) { if (mouseEventArgs.ChangedButton == MouseButton.Left && (mouseEventArgs.Timestamp - _lastClick) < SystemInfo.DoubleClickTime) { this.InvokeActions(mouseEventArgs); _lastClick = 0;
It has worked so far. But today, suddenly, a single click causes an action. When I checked the code, I found that the timestamp value is negative, which leads to the fact that it is always less than SystemInfo.DoubleClickTime (500 is what mine is set to).
This is normal? Why has this suddenly changed?
source share