Skip to content
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

Issue with cursor hiding when deleting controls #18212

Open
adel-bakhshi opened this issue Feb 16, 2025 · 0 comments
Open

Issue with cursor hiding when deleting controls #18212

adel-bakhshi opened this issue Feb 16, 2025 · 0 comments
Labels

Comments

@adel-bakhshi
Copy link

adel-bakhshi commented Feb 16, 2025

Describe the bug

I have a grid on the page and I set the cursor property to None.
Inside this grid there are one or more Canvases (the number may change depending on different conditions) and I also created a number of UserControls, each of which does a specific task.
I display these UserControls manually in one of the Canvases, I mean I use the Canvas.Children.Add() code.
So far there is no problem, but when I want to remove a control from the page or remove the Canvas (Canvas.Children.Remove() or Grid.Children.Remove()), the mouse appears on the page for a moment and then hides again.
The program I created needs the mouse to be hidden throughout its execution and displaying the mouse may cause some problems.

To Reproduce

Setting the cursor to None
Adding a Canvas to the page
Adding a UserControl to the page
Removing a UserControl or Canvas from the page
Mouse becomes visible

Expected behavior

The mouse is always hidden.

Avalonia version

11.2.3

OS

Windows

Additional context

2025-02-15.20-19-39.mp4

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant