Xamarin forms custom splash screen

Published

On my Splash screen, I want to put the App version for both Android and iOS at the bottomenter image description here

Source: Xamarin.ios Questions

Published
Categorised as Uncategorised Tagged , , , ,

Answers

This is how I add a Splash Screen in my Xamarin Forms apps

  1. Create a new ContentPage ie Splash.xaml
  2. Set the MainPage in your App.xaml.cs file to MainPage = new Splash();
  3. On the Splash.xaml I add an image (logo) and set the ContentPage backgroundcolor to my desired color for the app.
  4. Add a Label on the Splash.xaml below the Image
  5. On the Splash.xaml.cs OnAppearing() function set the Label’s Text = to app’s current version. You could use the Xamarin.Essentials plugin to get the version. Optionally, I then run a Task to animate the logo or fade it in/out. Once the animation is done in the Splash.xaml.cs OnAppearing function I then set the MainPage to a new page ie. a Login page or Main.xaml
  6. In the Android project, I leave the MainActivity “MainLauncher = true” as is.
  7. In the iOS Project, I remove the Xamarin logo from the StoryBoard and set the background color to my desired color for the app.

Here is some sample code on my website.


Mr. Nathanael Moen V

Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq