0
votes

I'm having a problem in Xamarin forms:

I want to open a any page in my app when standing in the main page of app.

Example: Flow of my app:

Main page -> List detail contact -> Detail Contact -> Edit Contact -> ...

I want to navigate from "Main page" to "Detail Contact" without having to go through "List detail contact"

  • At AppDelegate.cs, I send a message to "MainPageViewModel.cs"

    MessagingCenter.Send(new AddNewContactEventMessage(), nameof(AddNewContactEventMessage));

  • At method Initialize() of "MainPageViewModel.cs", I subcrible message and navigate to "Contact Detail Page":

            MessagingCenter.Subscribe<AddNewContactEventMessage>(this, nameof(AddNewContactEventMessage), message =>
        {
    
            Device.BeginInvokeOnMainThread(async () =>
            {
                try
                {
                    await NavigationService.NavigateAsync(nameof(ContactDetailPage), new ContactManagerNavigationParameters()
                    {
                        ContactId = 0,
                        ManagerId = ActivatedUser.UserId
                    });
                }
                catch (Exception ex)
                {
                    Logger?.Exception(ex);
                }
            });
        });
    
  • But when "Detail Contact" is open, Toobar of page is hidden.

  • Why Toolbar is hidden? And how to fix it?

Please help me!

Thanks!

1
Why are you using MessagingCenter to navigate???FabriBertani
I'm coding 3D touch on iOS with Xamarin Forms. I can't navigate to certain page in my application.Bill Nguyen

1 Answers

0
votes

Give a title to the page in xaml or from code behind, that shows toolbar .