Toast
Toast copied to clipboard
:bread: The rounded and animated Android Toast for .NET WPF/XAML
Toast
Android Toast for WPF
How to use
1. Add Binaries
-
NuGet
-
Android Toast is also available on NuGet! Install by typing
Install-Package AndroidToast
in NuGet Package Manager Console. (Or search forAndroidToast
on NuGet)
-
Android Toast is also available on NuGet! Install by typing
-
Manually
- Download the latest Library (.dll)
- Add the .dll to your Project (Right click
References
in the Project Tree View, clickAdd References
andBrowse
to the.dll
File)
2. Add the reference
- XAML Window
<Window x:Class="ToastDemo.MainWindow"
[...]
----IMPORTANT LINE!----
xmlns:toast="clr-namespace:Toast;assembly=Toast"
[...] >
- C# (using)
using Toast;
- VB (using)
Imports Toast
3. Add Toast to Window/User Control
- XAML
<toast:Toast x:Name="myToast" Message="Hello World!" Duration="0:0:0:5"/>
- C#
// (Or in code)
Toast myToast = new Toast();
myToast.DurationToast = Toast.Toast.ToastDuration.Long;
myToast.Message = "Hello World!";
someControl.Children.Add(myToast);
someOtherControl.Content = myToast;
4. Set desired Parameters
-
Toast.Duration
/Toast.DurationToast
: The display-time of this Toast -
Toast.Message
/Toast.Content
: The Message to display (Can also be a{Binding}
) -
Toast.DurationAnimation
: The duration of the fade-in/out animation
5. Show Toast
myToast.Show();
6. (Optional) Hide Toast manually:
myToast.Hide();
Screenshots


Thanks for using Toast!