You can use SnackBar
from Xamarin Community toolkit package, which uses native implementation in platforms where natively supported, because Toast
is deprecated in API level 30, a SnackBar
without an Action is equivalent to a Toast.
This method was deprecated in API level 30.
Custom toast views are deprecated. Apps can create a standard text toast with the makeText(android.content.Context, java.lang.CharSequence, int) method, or use a Snackbar when in the foreground. Starting from Android Build.VERSION_CODES#R, apps targeting API level Build.VERSION_CODES#R or higher that are in the background will not have custom toast views displayed. (source).
- Install the Package on all your projects
- include the namespace
using Xamarin.CommunityToolkit.Extensions;
- In your page code-behind show a SnackBar upon an event
await this.DisplayToastAsync("This is a Toast Message");
await this.DisplayToastAsync("This is a Toast Message for 5 seconds", 5000);
You may specify a duration for the SnackBar to disappear (in milliseconds) or leave the default one which equals 3 seconds.

Resources
Official Repo https://github.com/xamarin/XamarinCommunityToolkit
Official Docs https://learn.microsoft.com/en-us/xamarin/community-toolkit/
EDIT
- Anchored Toast: You may anchor the toast above a view (like screenshot above) by simply calling the extension method
DisplayToastAsync()
from that view (anchor) object instead from the page instance (this
):
<Button x:name="floatingButton" .../>
await floatingButton.DisplayToastAsync("This is a Toast Message for 5 seconds", 5000);
- Padding and corner radius: (starting from xct version 1.3.0 preview-1)
You can set the corner radius and the padding for your Toast like the following example:
var messageOptions = new MessageOptions
{
Message = "Toast with Padding and round corner",
Foreground = Color.White,
Font = Font.SystemFontOfSize(16),
Padding = new Thickness(20)
};
var options = new ToastOptions
{
MessageOptions = messageOptions,
CornerRadius = new Thickness(40, 40, 0, 0),
BackgroundColor = Color.FromHex("#CC0000")
};
await this.DisplayToastAsync(options);


PS: The same properties could be applied for the SnackBar
view.
EDIT2
If what xct SnackBar
offers doesn't fulfil your requirements or you want to display not only text but some complexe view, you might have to use a popup instead.