Xamarin Forms - How to Set Login page at Startup and later change to Home Page Or Change Startup Page

Xamarin Forms


How to Set Login page at Startup and later change to Home Page as Current.MainPage in Xamarin Forms





Step  -1

In-App.XaML.cs

Change MainPage Object from MainPage to PageLogin. This will change the Startup page from Main to Page Login

Code :  Application.Current.MainPage = new PageLogin();

Step 2
Page Login :  In Button of Login (Validation == True)

Code : Application.Current.MainPage = new MainPage();

Note: Once you have Validated User successfully change back to MainPage

Comments

Popular posts from this blog

Shared / Static Class in vb.net/C#

Xamarin Forms : PopUp Page with RG.Plugins.Popup

Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard)