MasterDetailPage questions

I people, i have and big problem. In my app i have a master detail page Menu



The menu works fine and instantiate all the views but when i press one the itens in the list view it opens the player view but the menu itens its gone

my app has a listviewmodel class who menage de itemselect from the list view code:
private HomeListViewModel selectedItem { get; set; }
public HomeListViewModel SelectedItem
{

        get
        {
            return selectedItem;
        }

        set
        {
            selectedItem = value;


            // When your item is selected, you can open a new "PageDetail" and pass the value
            if (selectedItem == null)
            {
                return;

            }
            else
            {
                App.Current.MainPage.Navigation.PushModalAsync(new PlayerView(selectedItem));

            }
        }
    }

Some one can help me?

Best Answer

Answers

  • GoncaloLopesGoncaloLopes PTMember ✭✭

    Solved
    ((MasterDetailPage)Application.Current.MainPage).Detail = new NavigationPage((Page)Activator.CreateInstance(page, selectedItem));

Sign In or Register to comment.