Skip to content

Instantly share code, notes, and snippets.

@JoeM-RP
Created May 22, 2018 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoeM-RP/0f17b15f601ffc6410613842e2831c0d to your computer and use it in GitHub Desktop.
Save JoeM-RP/0f17b15f601ffc6410613842e2831c0d to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using Prism.Navigation;
using Xamarin.Forms;
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
namespace PrismForms.Views
{
public partial class AppShell : MasterDetailPage, IMasterDetailPageOptions
{
public AppShell()
{
InitializeComponent();
}
/// <summary>
/// Gets a value indicating whether this <see cref="T:PrismForms.Views.AppShell"/> is presented after navigation.
/// </summary>
/// <remarks>
/// Required by <see cref="T:Prism.Navigation.IMasterDetailPageOptions"/>
/// </remarks>
/// <value><c>true</c> if is presented after navigation; otherwise, <c>false</c>.</value>
public bool IsPresentedAfterNavigation => Device.Idiom != TargetIdiom.Phone;
}
public class AppShellNavigationPage : Xamarin.Forms.NavigationPage, INavigationPageOptions, IDestructible
{
public AppShellNavigationPage()
{
BarTextColor = (Color)App.Current.Resources["White"];
BarBackgroundColor = (Color) App.Current.Resources["BrandColor"];
}
public bool ClearNavigationStackOnNavigation
{
get { return false; }
}
public void Destroy()
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment