Skip to content

bengry/Toasty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toasty

A toast control for WPF like the Snackbar toast in Android.

Available on NuGet!

Alt text

How To

Reference the assembly:

xmlns:toasty=clr-namespace:Toasty;assembly=Toasty

And just add a a Toasty object to your main Grid:

<toast:Toasty x:Name="myToast"
		Height="30"
        	VerticalAlignment="Bottom"
        	Duration="0:0:0:2"
		Message="{Binding MyMessage}"
		CommandTitle="myAction"
		Command="{Binding MyCommand}"
		CommandParameter="someParam"
		FontFamily="Segoe UI"
		FontWeight="Bold"
		MessageColor="Orange"
		ActionColor="Yellow"
		Background="Black"
		FontSize="12" />

Showing a toast can be code programatically:

myToast.Show("Hello World!", TimeSpan.FromSeconds(1));
//or
await myToast.ShowAsync("Hello World!", TimeSpan.FromSeconds(1));

Or if you use MVVM, just bind the Message property of a Toasty to a string like so:

<toast:Toasty Message={Binding MyMessage} />

Setting a new string to MyMessage will show a toast.

Feel free to contact me with any issues, requests or feedback you may have. I'm open for suggestions and improvemnts and encourage you to fork the project.

About

A toast control for WPF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages