public MainPage()
{
this.InitializeComponent();
this.Loaded += this.OnLoaded;
SystemNavigationManager.GetForCurrentView().BackRequested += this.OnBackRequested;
if (ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
{
this.BackButton.Visibility = Visibility.Collapsed;
}
this.DataContextChanged += this.OnDataContextChanged;
}