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

Problem with displaying the auto-completion list #449

Closed
gsa-m opened this issue Aug 23, 2024 · 2 comments · Fixed by #452
Closed

Problem with displaying the auto-completion list #449

gsa-m opened this issue Aug 23, 2024 · 2 comments · Fixed by #452

Comments

@gsa-m
Copy link

gsa-m commented Aug 23, 2024

The list display problems start with Avalonia version 11.1.0 (the previous version 11.0.13 works correctly).

Error: [Binding]An error occurred binding 'Content' to 'Content' at 'Content': 'Unable to cast object of type 'System.String' to type 'AvaloniaEdit.CodeCompletion.ICompletionData'.' (ContentPresenter #48657561)

2024-08-23_10-46-54

@mgarstenauer
Copy link
Contributor

I am seeing the same issue (Avalonia 11.1.3, AvaloniaEdit 11.1.0). Changing the control template here to

<ContentPresenter Content="{Binding Content, Mode=OneTime}" />

fixes the issue – at least in my app. Not sure what the underlying cause is. Some changes in the binding system?

@AlexKerman
Copy link

AlexKerman commented Sep 4, 2024

Another solution (in a ICompletionData implementarion):

public object Content => this;

Be careful it may lead to StackOverflow

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

Successfully merging a pull request may close this issue.

3 participants