I've just started to test my app on android tablet and have found a strange bug: I wanted to being masterpage enabled only when my main page is opened. So I created Custom NavigationPage and overrided methods:
/// <summary>
/// Отключение бокового меню при добавлении на главный экран новых страниц
/// </summary>
/// <param name="child"></param>
protected override void OnChildAdded(Element child)
{
base.OnChildAdded(child);
if (this.Navigation.NavigationStack.Count > 1)
App.detailPage.IsGestureEnabled = false;
}
/// <summary>
/// Включение бокового меню при наличии только одной страницы на главном экране
/// </summary>
/// <param name="child"></param>
protected override void OnChildRemoved(Element child)
{
base.OnChildRemoved(child);
if (this.Navigation.NavigationStack.Count < 2)
App.detailPage.IsGestureEnabled = true;
}
here is my landscape main page:
When I push some pages to my NavigationPage, the master page disappears:
and after that, when I return on my main page, the masterpage is still not available:
At least I need to show my MasterPage on my MainPage, and it would be perfect if somebody tell me, how to hide masterpage to the left and use it with swipe gestures, like on phones. Thanks in advance.