Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AvaloniaCommunity/Notification.Avalonia
https://github.com/AvaloniaCommunity/Notification.Avalonia
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/AvaloniaCommunity/Notification.Avalonia
- Owner: AvaloniaCommunity
- License: mit
- Created: 2022-03-18T08:03:33.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-29T08:11:22.000Z (9 months ago)
- Last Synced: 2024-04-27T11:28:44.190Z (8 months 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 ![this](https://github.com/Enterwell/Wpf.Notifications) repo
---
To start you should install NuGet package
> Install-Package Notification.Avalonia[![nuget](https://img.shields.io/badge/nuget-notification-blue)](https://www.nuget.org/packages/Notification.Avalonia/)
or download https://www.nuget.org/packages/Notification.Avalonia/ repo.---
![](https://github.com/AvaloniaCommunity/Avalonia.Notification/blob/master/Images/Avalonia.Notification.gif)
---
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();
```