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

Remove need for RemoveFromVisualTree #898

Open
benstevens48 opened this issue Dec 30, 2022 · 0 comments
Open

Remove need for RemoveFromVisualTree #898

benstevens48 opened this issue Dec 30, 2022 · 0 comments

Comments

@benstevens48
Copy link

It would be a lot easier to use CanvasControl etc if it wasn't necessary to call RemoveFromVisualTree after we no longer need it. Actually, #801 ensures we don't need to call it if all event handlers are removed. But we can do better by using the built-in APIs for reference tracking that WinUI makes use of. Some time ago, I created a WinUI issue to suggest separatng this logic out, maybe making it part of WIL, so it can be reused elsewhere e.g. in Win2D. See microsoft/microsoft-ui-xaml#3720. With this, we could get rid of RemoveFromVisualTree entirely, but if we wanted to retain it for backwards compatibility, we would still need to implement #801 (for a full discussion of why that pull request is a good idea, see #799).

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

No branches or pull requests

2 participants