All Projects → emoacht → Desktoptoast

emoacht / Desktoptoast

Licence: other
A library for toast notifications from desktop app

Labels

Projects that are alternatives of or similar to Desktoptoast

Easyandroid
一系列简单、轻量、方便的Android开发工具集合(持续更新中),包括Android动态权限、SharedPreferences、反射、日志、Toast、Bundle、MVP、线程池、Html、图文混排、蒙层引导、拍照、图库选择等
Stars: ✭ 1,039 (+889.52%)
Mutual labels:  toast
Sstoastmessage
SSToastMessage is written purely in SwiftUI. It will add toast, alert, and floating message view over the top of any view. It is intended to be simple, lightweight, and easy to use. It will be a popup with a single line of code.
Stars: ✭ 82 (-21.9%)
Mutual labels:  toast
Vue Toastr
Vuejs Toast : Plugin and Component Capability.
Stars: ✭ 93 (-11.43%)
Mutual labels:  toast
Fancytoast Android
Make your native android Toasts Fancy. A library that takes the standard Android toast to the next level with a variety of styling options. Style your toast from code.
Stars: ✭ 1,067 (+916.19%)
Mutual labels:  toast
Ktoast
Customizable toast messages.
Stars: ✭ 70 (-33.33%)
Mutual labels:  toast
Fluttertoast
Flutter Toast
Stars: ✭ 84 (-20%)
Mutual labels:  toast
React Native Easy Toast
A react native module to show toast like android, it works on iOS and Android.
Stars: ✭ 990 (+842.86%)
Mutual labels:  toast
Windowshowdemo
Android 弹窗案例总结(仿淘宝弹窗 咸鱼菜单 筛选列表)
Stars: ✭ 95 (-9.52%)
Mutual labels:  toast
Android Target Tooltip
Create Toast like tooltips, but targets can be specified, plus custom properties and features
Stars: ✭ 1,221 (+1062.86%)
Mutual labels:  toast
Bulma Toast
Bulma's pure JavaScript extension to display toasts
Stars: ✭ 93 (-11.43%)
Mutual labels:  toast
Topmessage
A beautiful way of message prompting instead of Toast!
Stars: ✭ 62 (-40.95%)
Mutual labels:  toast
Reapop
📮 A simple and customizable React notifications system
Stars: ✭ 1,155 (+1000%)
Mutual labels:  toast
Pixpic
PixPic, a Photo Editing App
Stars: ✭ 1,261 (+1100.95%)
Mutual labels:  toast
React Native Redux Toast
Simple to use, easy to customize Toast component for Android & iOS. Developed with love for redux apps
Stars: ✭ 51 (-51.43%)
Mutual labels:  toast
Jjhud
JJHUD is an displays a translucent HUD with an indicator and/or labels .
Stars: ✭ 94 (-10.48%)
Mutual labels:  toast
Jhud
A full screen of the HUD when loading the data (Objective-C).
Stars: ✭ 1,003 (+855.24%)
Mutual labels:  toast
Jquery Toast Plugin
Highly customizable jquery plugin to show toast messages
Stars: ✭ 1,237 (+1078.1%)
Mutual labels:  toast
Android Appmsg
In-layout notifications. Based on Toast notifications and article by Cyril Mottier (http://android.cyrilmottier.com/?p=773).
Stars: ✭ 1,384 (+1218.1%)
Mutual labels:  toast
Avocadotoast
Small example app for SwiftWebUI
Stars: ✭ 94 (-10.48%)
Mutual labels:  toast
Floatingtoast
Android library to create customizable floating animated toasts like in Clash Royale app
Stars: ✭ 86 (-18.1%)
Mutual labels:  toast

Desktop Toast

A library for toast notifications from desktop app. This library will, if necessary, install a shortcut in Windows startup and show a toast asynchronously.

Requirements

  • .NET Framework 4.5.2
  • Windows 8.0 or newer

Contents

  • DesktopToast - The library.

  • DesktopToast.Wpf - Sample WPF app to use this library.

  • DesktopToast.WinForms - Sample WinForms app to use this library.

  • DesktopToast.Proxy - Sample console app which acts as proxy to this library. This app will accept a request in JSON format from standard input, transfer the request to this library and return the result to standard output.

Note

  • Windows in project references is for using Windows Runtime (WinRT) API. It refers to Windows.winmd whose location has been changed over time. If it is not solved, find its location in your system and modify its path in .csproj file.

Usage

Instantiate ToastRequest class, set its properties and then call ToastManager.ShowAsync method.

public async Task<bool> ShowToastAsync()
{
    var request = new ToastRequest
    {
        ToastTitle = "DesktopToast WPF Sample",
        ToastBody = "This is a toast test.",
        ToastLogoFilePath = string.Format("file:///{0}", Path.GetFullPath("toast128.png")),
        ShortcutFileName = "DesktopToast.Wpf.lnk",
        ShortcutTargetFilePath = Assembly.GetExecutingAssembly().Location,
        AppId = "DesktopToast.Wpf",
    };

    var result = await ToastManager.ShowAsync(request);

    return (result == ToastResult.Activated);
}

ToastRequest class is a container of information necessary for installing a shortcut and showing a toast. It has the following properties:

Property Description Note
ToastTitle Toast title Optional
ToastBody Toast body Required for toast
ToastBodyList Toast body list (If specified, toast body will be substituted by this list.) Optional
ToastLogoFilePath Logo image file path of toast Optional
ToastAudio Audio type of toast Optional
ToastXml XML representation of Toast (If specified, this XML will be used for a toast as it is.) Optional
ShortcutFileName Shortcut file name to be installed in Windows startup Required for shortcut
ShortcutTargetFilePath Target file path of shortcut Required for shortcut
ShortcutArguments Arguments of shortcut Optional
ShortcutComment Comment of shortcut Optional
ShortcutWorkingFolder Working folder of shortcut Optional
ShortcutWindowState Window state of shortcut Optional
ShortcutIconFilePath Icon file path of shortcut Optional
AppId AppUserModelID of application Required
ActivatorId AppUserModelToastActivatorCLSID of application (for Action Center of Windows 10) Optional
WaitingDuration Waiting duration before showing a toast after the shortcut file is installed Optional

Action Center of Windows 10

To interact with Action Center of Windows 10, an application needs to register COM class type which implements INotificationActivationCallback. In addition, the registration of COM server in the registry is required for an application to be started by COM when it is not running.

See WPF sample for implementation. Note that the CLSID of COM class type (AppUserModelToastActivatorCLSID) must be unique for each application.

Also check the following sample.

Interactive toast of Windows 10

To show an interactive toast of Windows 10, prepare a XML representation of toast and set it to ToastXml property. Check the following article.

You can compose it from scratch or utilize NotificationsExtensions.Win10 library. See WPF sample.

License

  • MIT License
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].