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

The application crashes if the same content is displayed twice in WindowNotificationManager #15766

Open
afunc233 opened this issue May 20, 2024 · 5 comments

Comments

@afunc233
Copy link
Contributor

Describe the bug

this pr #15628 use a Dictionary<object, NotificationCard> to interim storage . but Key of Dictionary should unique. crashes happend

To Reproduce

ControlCatalog.NetCore

image

Expected behavior

solve the problem

Avalonia version

last master

OS

No response

Additional context

No response

@timunie
Copy link
Contributor

timunie commented May 21, 2024

/cc @wieslawsoltes

@emmauss
Copy link
Contributor

emmauss commented May 28, 2024

content, which is the key for the notification, can be any avalonia content that can be rendered, including Visual. If it isn't unique, it will still cause errors when the content is attached to the visual tree multiple times, as you can't attach a visual more than once.

@afunc233
Copy link
Contributor Author

yep , so i can't fix it , But it's still a problem, isn't it?

@timunie
Copy link
Contributor

timunie commented May 28, 2024

@afunc233 in my understanding it is an issue. Sure the same visual can't be shown twice. The same content can however be shown twice if DataTemplates are used. Need to check the sample carefully.

@emmauss
Copy link
Contributor

emmauss commented May 28, 2024

Yes, it is still an issue.

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

4 participants