https://github.com/AvaloniaCommunity/Notification.Avalonia
https://github.com/AvaloniaCommunity/Notification.Avalonia
Last synced: 30 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/AvaloniaCommunity/Notification.Avalonia
- Owner: AvaloniaCommunity
- License: mit
- Created: 2022-03-18T08:03:33.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-29T08:11:22.000Z (about 1 year ago)
- Last Synced: 2024-04-27T11:28:44.190Z (about 1 year ago)
- Language: C#
- Size: 235 KB
- Stars: 115
- Watchers: 6
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-avalonia - Notification.Avalonia - Control for show different information in LINQ style. (Libraries & Extensions / Controls)
README
# Notification.Avalonia
Port of  repo
---
To start you should install NuGet package
> Install-Package Notification.Avalonia[](https://www.nuget.org/packages/Notification.Avalonia/)
or download https://www.nuget.org/packages/Notification.Avalonia/ repo.---

---
For use:
1. Add style in App.xaml
```xml
...
```
2. Add notification panel in your window
```xml
```3. Bind manager from vm
```cs
public INotificationMessageManager Manager { get; } = new NotificationMessageManager();
```4. Run notification
```cs
this.Manager
.CreateMessage()
.Accent("#1751C3")
.Animates(true)
.Background("#333")
.HasBadge("Info")
.HasMessage(
"Update will be installed on next application restart. This message will be dismissed after 5 seconds.")
.Dismiss().WithButton("Update now", button => { })
.Dismiss().WithButton("Release notes", button => { })
.Dismiss().WithDelay(TimeSpan.FromSeconds(5))
.Queue();
```