how to change the position of the toast in maui?

mc 6,701 Reputation points
2026-02-05T05:07:00.16+00:00

I am using .net maui and I want to use toast so I use CommunityToolkit. and I find that I can not change the position of the toast . I want to change it to middle and change the background of it.

how to do it?

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

Answer accepted by question author
  1. Adiba Khan 2,160 Reputation points Microsoft External Staff
    2026-02-05T06:43:18.7+00:00

    Thanks for reaching out. In .NET MAUI, when using CommunityToolkit.Maui Toast, the behavior you are seeing is expected. Currently, the toast implementation is intentionally lightweight and does not support changing the toast position or background styling public APIs.

    Why this limitation exists

    The toast in CommunityToolkit.Maui is a native-platform toast wrapper:

    The Toast in CommunityToolkit.Maui is native-platform toast wrapper:

    • Android-> Uses native Android Toast (position in system-controlled)
    • iOS-> Uses a system-style overlay notification

    Because of this:

    • Positioning (center/middle) cannot be customized.
    • Background color, corner radius, or layout cannot be changed.
    • These constraints are imposed by the underlying, OS behavior, not MAUI itself.

    Supported Options

    At this time:

    • You can control text, duration and front size.
    • You cannot control position or background Example of supported usage:
        using CommunityToolkit.Maui.Alerts;
        using CommunityToolkit.Maui.Core;
        
        await Toast.Make(
        	"This is a toast message",
        	ToastDuration.Short,
        	14
        ).Show();
      

    Recommended workaround (if customization is required)

    if your requirement is to:

    • Show the message in the middle of the screen
    • Customize background color, opacity, or layout

    We recommend using Snackbar or a custom overlay view instead.

    Option 1: Use Snackbar(partially customizable)

    Using CommunityToolkit.Maui.Alerts;
    Using CommunityToolkit.Maui.core;
    
    await Snackbar.Make(
    	"This is a snackbar message",
    	null,
    	"OK",
    	TimeSpan.FromSeconds(3)
    ).Show();
    
    

    Note: Snackbar still has placement constraints but allows more styling than Toast.

    Option 2: Custom popup/overlay (fully customizable)

    For full control, create a custom popup using:

    • CommunityToolkit.Maui.Views.Popup
    • or a model overlay layout

    This approach allows:

    • Center positioning
    • custom background, animations and styles
    • Consistent behavior across platforms

    Github reference

    This limitation is tracked and discussed in the Community Toolkit repository:

    You can follow or upvote related feature requests in the Issues section to influence future enhancements.

    Please let us know if you require any further assistance we’re happy to help. If you found this information useful, kindly mark this as "Accept Answer".


1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2026-02-05T05:07:14.17+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    In .NET MAUI, the Toast functionality provided by the CommunityToolkit does not allow for customization of its position or background color. The Toast is designed to appear at the bottom of the screen and is automatically dismissed after a set duration. The only customization options available are the text, duration, and font size, as specified in the documentation.

    If you need more control over the appearance and position of notifications, you might want to consider using a Popup instead, which allows for more customization in terms of layout and design.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.