See below my App running
below is the Login Page code
public void Login_Clicked(object sender, EventArgs e)
{
LoginService svc = new LoginService();
LoginRS res = svc.Login(txtUsuario.Text, txtSenha.Text);
if (res != null && res.Success )
{
App.LooggedUser = res;
Application.Current.MainPage = new MasterDetailPage
{
Master = new Master(),
Detail = new TabbedPage
{
Children =
{
new NavigationPage(new Indicadores()){ Title = "Indicadores"},
new NavigationPage(new PaineisPage()){ Title = "Painéis"}
}
}
};
.....
}
below is my App.xaml.cs
public static bool IsUserLoggedIn { get; set; }
public static string LastPassword { get; set; }
public static LoginRS LooggedUser { get; set; }
public NavigationPage NavigationPage { get; private set; }
public static NavigationPage NavPage { get; set; }
public static MasterDetailPage MasterDetail { get; set; }
public async static Task NavigateAsynNavigateMasterDetail(Page page)
{
App.MasterDetail.IsPresented = false;
await App.MasterDetail.Master.Navigation.PushAsync(page);
}
public App()
{
InitializeComponent();
if (!IsUserLoggedIn)
{
NavPage = new NavigationPage(new LoginPage());
MainPage = NavPage;
}
else
{
NavPage = new NavigationPage(new MainPage());
MainPage = NavPage;
}
}
below is my Indicadores constructor page
InitializeComponent();
NavigationPage.SetHasNavigationBar(this, true);
NavigationPage.SetTitleIcon(this, "estapar.png");
I did various attempts trying to put an image in the bar but not get. I thought that navigation bar belong to Detail page, but i'm not getting to do. I tried in the Master, MainPage and nothing. It seems easy but doesn't work. I have no resource, no longer. How can i put an image in the bar next to menu icon? When i thought that solve all my issues appears more.