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

"Value is null" error spam when binding to an element #15554

Open
TomEdwardsEnscape opened this issue Apr 29, 2024 · 0 comments
Open

"Value is null" error spam when binding to an element #15554

TomEdwardsEnscape opened this issue Apr 29, 2024 · 0 comments

Comments

@TomEdwardsEnscape
Copy link
Contributor

TomEdwardsEnscape commented Apr 29, 2024

Describe the bug

When binding to $self or to a named element (e.g #MyButton), the binding system emits a log message saying that "Value is null". In our real application, we have an ItemsControl which leads to hundreds of these messages being emitted, noticeably affecting performance.

The binding works fine though.

To Reproduce

Add this XAML to any window and compile:

<Button Content="{Binding $self.Flyout.Placement}">
	<Button.Flyout>
		<MenuFlyout Placement="AnchorAndGravity">
			
		</MenuFlyout>
	</Button.Flyout>
</Button>

This will appear in the log output:

[Binding]An error occurred binding 'Content' to 'Flyout.Placement' at 'Flyout': 'Value is null.' (Button #5560998)

Expected behavior

No error messages

Avalonia version

11.1.0-beta2

OS

No response

Additional context

No response

@TomEdwardsEnscape TomEdwardsEnscape changed the title "Value is null" error spam when binding to a named element "Value is null" error spam when binding to an element Apr 29, 2024
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