0
votes

I am using Visual Studio Xamarin Forms, and I have two different views in a project called Favorits and MainPage. Every time I run the emulator it opens the MainPage view, even if the Favorits view is open.

1
this is not complete question can you send the code what are you try ? - Pratius Dubey
With "run the emulator" do you mean "run" from visual studio? Because this will restart the app on the emulator (it has to because it builds and copies another version of your app), so the app doesn't remember which page was open before (unless you're specifically storing the state somewhere on the device) - user10608418

1 Answers

1
votes

What you want to do is set the Start ContentPage (or view) in you App.xaml.cs portable project.

public partial class App : Application
{
    public App()
    {
        InitializeComponent();

        //uncomment the one you need

        //MainPage = new Views.MainPage();

        //MainPage = new Views.Favorits();

    }
}

Hope this helps.