New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IsPointerOver does not Work with OnPointerReleased #15293
Labels
Comments
Check the Button source for how it handles this. In code-behind, it can be a bit simpler: void OnPointerReleased(object sender, PointerReleasedEventArgs e)
{
var point = e.GetCurrentPoint(section).Position;
if (section.Bounds.Contains(point))
treasure.IsVisible = !treasure.IsVisible;
} This may be by-design because there are scenarios where you want |
@Elbon-Eastmage are you happy with the provided proposal? If so, we can make this a Q&A rather than a bug report. |
Open
3 tasks
That pull request looks perfect! Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When IsPointerOver is placed inside an OnPointerReleased event handler, it always returns true, even if the pointer isn't actually over the associated control.
To Reproduce
Expected behavior
Since the pointer wasn't over the visible box when the mouse button was released, the hidden text shouldn't have been shown.
Avalonia version
11.0.10
OS
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered: