using System;
using System.Collections.Generic;

using Xamarin.Forms;

namespace inutralia.Views
{
	public partial class RootPage : MasterDetailPage
	{
		public RootPage()
		{
			InitializeComponent();
		}

		public void Navigate<T>() where T:ContentPage
		{
            NavigationPage p = Detail as NavigationPage;
            if(p?.Navigation?.NavigationStack?[0]?.GetType() != typeof(T) )
    			Detail = new NavigationPage(Activator.CreateInstance(typeof(T)) as Page);

			IsPresented = false;
		}
	}
}
