Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azureams/toastnotification.uno
Basic ToastNotification for the Uno Platform
https://github.com/azureams/toastnotification.uno
android cross-platform gtk hacktoberfest ios macos net-standard toast-notifications uno-platform uwp wasm wpf
Last synced: about 3 hours ago
JSON representation
Basic ToastNotification for the Uno Platform
- Host: GitHub
- URL: https://github.com/azureams/toastnotification.uno
- Owner: AzureAms
- License: mit
- Created: 2021-05-07T02:48:01.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-22T01:45:38.000Z (almost 2 years ago)
- Last Synced: 2024-12-30T20:36:05.162Z (16 days ago)
- Topics: android, cross-platform, gtk, hacktoberfest, ios, macos, net-standard, toast-notifications, uno-platform, uwp, wasm, wpf
- Language: C#
- Homepage:
- Size: 2.07 MB
- Stars: 3
- Watchers: 0
- Forks: 3
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Uno.Extras.ToastNotification
Basic ToastNotification for the Uno Platform.
Provides basic, signature-compatible APIs with [Microsoft.Toolkit.Uwp.Notifications](https://www.nuget.org/packages/Microsoft.Toolkit.Uwp.Notifications/), for the Uno Platform.
![BuildStatus](https://github.com/AzureAms/ToastNotification.Uno/actions/workflows/ci.yml/badge.svg)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/47592730202a49079eb0875f6df46a95)](https://www.codacy.com/gh/AzureAms/ToastNotification.Uno/dashboard?utm_source=github.com&utm_medium=referral&utm_content=AzureAms/ToastNotification.Uno&utm_campaign=Badge_Grade)| Package | Version |
| ---- | ---- |
| Cross platform | [![CrossPlatformShield](https://img.shields.io/nuget/vpre/ToastNotification.Uno)](https://www.nuget.org/packages/ToastNotification.Uno) |
| WPF | [![WpfShield](https://img.shields.io/nuget/vpre/ToastNotification.Uno.Wpf)](https://www.nuget.org/packages/ToastNotification.Uno.Wpf) |
| WASM | [![WasmShield](https://img.shields.io/nuget/vpre/ToastNotification.Uno.Wasm)](https://www.nuget.org/packages/ToastNotification.Uno.Wasm) |
| GTK | [![WasmShield](https://img.shields.io/nuget/vpre/ToastNotification.Uno.Gtk)](https://www.nuget.org/packages/ToastNotification.Uno.Gtk) |## Usage
```C#
#if __ANDROID__
var logoSource = new LogoSource(new Uri("ms-appx:///sample.png"));
#else
var logoSource = new LogoSource(new Uri("ms-appx:///Assets/sample.png"));
#endif
logoSource.Dispose();await new ToastNotification()
.AddAppLogoOverride(logoSource)
.AddText("Toaster with buttons")
.AddText("Hello world!")
.AddText("Wanna play with me?")
.AddButton(new ToastButton()
.SetContent("Let's go!")
.AddArgument("ShouldPlay", true)
)
.AddButton(new ToastButton()
.SetContent("Another time")
.SetDismissActivation()
)
.Show();
```## Notes
- Help is wanted in providing support for Tizen. Pull requests are welcome.
- Support for macOS is implemented using deprecated APIs. Please help us fix this by fixing [#21](https://github.com/AzureAms/ToastNotification.Uno/issues/21).
- iOS notifications are implemented, but not tested. Please report any issues.
- You can extend the functionality of this library to unsupported platforms by creating an extension method `Show(ToastNotification toast)`.