-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Refractor WindowNotificationManager #12178
Refractor WindowNotificationManager #12178
Conversation
The CI reports several binary breaking changes, those likely won't be accepted in 11.x.
I also wonder about the |
@MrJul it wasn't meant to be a breaking change. I thought it won't be as it allowed more things than before, but I was wrong. Will try to fix those breaking changes.
The reason is, that INotification is not (client)implementable anymore. Why all other things can be adjusted easily, the |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
src/Avalonia.Controls/Notifications/WindowNotificationManager.cs
Outdated
Show resolved
Hide resolved
- Allow usage from XAML - Allow any Visual as Host, so it can be used inside UserControl for example - Allow adding style classes for NotificationCards
4f2e59d
to
bfeeb10
Compare
Updated the PR. Would be nice if anyone can try and give me some feedback. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
It doesn't seem like it works this way. My idea is:
It still doesn't work if WindowNotificationManager was added from XAML, but Parent isn't attached to the root when we call this method. But I would say this behavior is expected. Also, less related to this PR changes, but other nice improvements we can do in 11.x: I am going to push these 3 changes. Let me know if it looks good to you. |
You can test this PR using the following package version. |
Naming is not perfect anymore with this PR, so we may want to rename this control in 12.0 ... BUT the new functionality is 😍 with the last recent changes from @maxkatz6 , so I'm fine with it. |
You can test this PR using the following package version. |
Hi, thank you all for all of the great work you do on Avalonia! I am curious as to when the customizable Show method will be available? I am currently using 11.0.10 and the new customization is necessary for my use case! |
@dhhunter in 11.1 it will be available. Beta package is currently in work. However you can also use nightly builds until 11.1 is there. |
@timunie Awesome! Thank you! How do I retrieve the generated NotificationCard after calling Show now? Previously, I was able to hack it with:
|
@dhhunter I'd use Interactions to show Notifications and return the Notification from there. https://github.com/AvaloniaUI/Avalonia.Samples?tab=readme-ov-file#view-interaction-samples |
What does the pull request do?
Improves the WindowNotificationManager a little bit:
What is the current behavior?
WindowNotificationManager is more limited
What is the updated/expected behavior with this PR?
Allow more flexibility for low cost
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues
Fixes #12134
Fixes #4462