Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mrousavy/toast

:bread: The rounded and animated Android Toast for .NET WPF/XAML
https://github.com/mrousavy/toast

android android-toast toast wpf xaml

Last synced: about 4 hours ago
JSON representation

:bread: The rounded and animated Android Toast for .NET WPF/XAML

Awesome Lists containing this project

README

        

# Toast
Android Toast for WPF

[Download the Demo (.exe)](https://github.com/mrousavy/Toast/raw/master/ToastDemo/bin/Release/ToastDemo.zip)

[![NuGet](https://img.shields.io/nuget/dt/AndroidToast.svg)](https://www.nuget.org/packages/AndroidToast/)

Buy Me a Coffee at ko-fi.com

# How to use

### 1. Add Binaries
+ NuGet
* [Android Toast is also available on NuGet!](https://www.nuget.org/packages/AndroidToast) Install by typing `Install-Package AndroidToast` in NuGet Package Manager Console. (Or search for `AndroidToast` on NuGet)

+ Manually
1. [Download the latest Library (.dll)](https://github.com/mrousavy/Toast/raw/master/Toast/bin/Release/Toast.dll)
2. Add the .dll to your Project (Right click `References` in the Project Tree View, click `Add References` and `Browse` to the `.dll` File)

### 2. Add the reference
* XAML Window
```xaml

```

* C# (using)
```cs
using Toast;
```

* VB (using)
```vb
Imports Toast
```

### 3. Add Toast to Window/User Control

* XAML
```xaml

```

* C#
```cs
// (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
```cs
myToast.Show();
```

### 6. (Optional) Hide Toast manually:
```cs
myToast.Hide();
```

# Screenshots

> Thanks for using Toast!