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

DevTools causes binding errors #17905

Open
ltetak opened this issue Jan 7, 2025 · 1 comment
Open

DevTools causes binding errors #17905

ltetak opened this issue Jan 7, 2025 · 1 comment

Comments

@ltetak
Copy link
Contributor

ltetak commented Jan 7, 2025

Describe the bug

The UI gets broken when I open some nodes in the visual tree in Avalonia DevTools. I assume that some binding gets broken.

To Reproduce

  1. open Avalonia Control Gallery
  2. select Panel (see the screenshot)
  3. header text disappears
    image
  4. select the MainWindow node and the header is back
    image

Expected behavior

DevTools should not affect the live application in any way

Avalonia version

11.2.0-11.2.3

OS

No response

Additional context

No response

@ltetak
Copy link
Contributor Author

ltetak commented Jan 7, 2025

I spent a few minutes investigating this and I guess the problem reveals when there is any relative binding. E.g. this caption

Text="{Binding $parent[TabControl].SelectedItem.(TabItem.Header), FallbackValue=''}">

I haven't got that far but it is possible that DevTools enumerates properties + gets their values with something being faked and these bindings do not find the parent properly. And this broken value affects the live control as well.

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