Implementing the SplashPage code using C#
Now that we have defined our user interface for our ContentPage
using XAML, the next step is to begin creating the underlying C# code within our SplashPage
code-behind file, which will be used to handle applying a 3-s timer on our splash screen, before navigating to our WalksMainPage
.
Let's take a look at how we can achieve this by following these steps:
Open the SplashPage.xaml.cs
code-behind file, ensuring that it is displayed within the code editor, and enter the following code snippet:
// // SplashPage.xaml.cs // Displays a timed splash screen for the TrackMyWalks application // // Created by Steven F. Daniel on 14/05/2018 // Copyright © 2018 GENIESOFT STUDIOS. All rights reserved. // using System.Threading.Tasks; using Xamarin.Forms; namespace TrackMyWalks.Views { public partial class SplashPage : ContentPage { public SplashPage() { InitializeComponent...