zachatrocity / netoaster

A .net WPF toaster library for very simple and slightly customizable toaster notifications
MIT License
46 stars 14 forks source link

netoaster

A .net toaster library for very simple and slightly customizable toaster notifications. Heavily inspired by angular-toastr

alt tag

how to use

  1. Install using nuget or by including the above netoaster project into your WPF app

  2. Call it

Toaster.ShowError(this, message: "My Error Message!");

alt tag

Toaster.ShowSuccess(this, message: "Success message", animation: ToasterAnimation.FadeIn);

alt tag

Toaster.ShowWarning(this, message: "Warning message", position: ToasterPosition.PrimaryScreenTopRight);

alt tag

  1. Optional parameters (more to come)
    • title - the text to display in header of the toaster
    • message - the text to display in the toaster
    • position - the position to show the toaster, like (default is PrimaryScreenBottomRight)
      • shout out to jublin
      • PrimaryScreenBottomRight
      • PrimaryScreenTopRight
      • PrimaryScreenBottomLeft
      • PrimaryScreenTopLeft
      • ApplicationBottomRight
      • ApplicationTopRight
      • ApplicationBottomLeft
      • ApplicationTopLeft
    • animation - the style of the animation
      • FadeIn (default)
      • SlideInFromRight
      • SlideInFromLeft
      • SlideInFromTop
      • SlideInFromBottom
      • GrowFromRight
      • GrowFromLeft
      • GrowFromTop
      • GrowFromBottom
    • margin - the desired distance away from the corner

To do:

Contributers

Concept

skeleton of code came from this stackoverflow post by Ray Burns. I customized it to my own needs.

Contribute

feel free to submit pull-requests