How To Display Toast Messages In Xamarin Forms?
Keyur Patel
September 12, 2025
2 min
What is Xamarin?
Xamarin is a tool supported by Microsoft. It provides way to developers to build native mobile applications. Those applications have native features and share common code at the same time.
Why do we need of Xamarin?
As it is developed by Microsoft for creating mobile application, so if you want to be run your same application on various platforms like IOS, Android and windows then you can achieve this by using Xamarin application.
What is the use of Toasts?
Toasts displays message that disappears after sometimes to the users.so messages do not stuck on the screen in mobile applications that is best use of toast.
How to use Toasts in Xamarin application?
First of all, add one interface in main project named as “IToastMessage”.Declare one function named as DisplayMessage(string Message) and pass string parameter to that method.
How to use Toasts in Xamarin android application?
First of all, add one class named as “Message_Driod.cs” in android application project and implement “IToastMessage” interface as below:
For “IToastMessage” interface give reference of your main project where you have created your interface to your android application project by right click on Reference folder of your android application project, then select add reference and click on project tab then select your main project and press ok.
How to use Toasts in Xamarin IOS application?
First of all, add one class named as “Message_IOS.cs” in android application project and implement “IToastMessage” interface as below:
For “IToastMessage” interface give reference of your main project where you have created your interface to your android application project by right click on Reference folder of your android application project, then select add reference and click on project tab then select your main project and press ok.
How to display Toasts in Xamarin Application?
Now You can display toast by using below code in main project code files:DependencyService.Get<IToastMessage>().DisplayMessage(“Your message here.”);

Keyur Patel
Co-Founder
Keyur Patel is the director at IT Path Solutions, where he helps businesses develop scalable applications. With his extensive experience and visionary approach, he leads the team to create futuristic solutions. Keyur Patel has exceptional leadership skills and technical expertise in Node.js, .Net, React.js, AI/ML, and PHP frameworks. His dedication to driving digital transformation makes him an invaluable asset to the company.
Related Blog Posts

Essential Features every Scalable Mobile App must have in 2026
Let’s start with a situation most product leaders recognize. It is early 2026. Your mobile app has finally found traction. Daily active users are climbing. Marketing campaigns are working. Investors are optimistic. Then something breaks. Screens take too long to load. This happens during peak hours. A payment fails silently. A security audit flags basic… Essential Features every Scalable Mobile App must have in 2026

How to choose the right Mobile App Development Partner for your Business Growth
Let’s start with a story that haunts the IT industry. A well-funded logistics company decided they needed a custom mobile app to track their fleet. They did what most companies do: they Googled mobile app development company, sent out a generic Request for Proposal (RFP) to the top five results, and picked the one with… How to choose the right Mobile App Development Partner for your Business Growth

November 1st Is NOT The Real Deadline For Android 15. Here’s What You’re Missing
Imagine waking up one morning and discovering your Android app is invisible to millions of users on the Google Play Store. No installs, no updates, no revenue. Sounds terrifying, right? It is not a science fiction plot; it is the looming reality many businesses and developers could face in November 2025 if they neglect the… November 1st Is NOT The Real Deadline For Android 15. Here’s What You’re Missing
