/// <summary> /// Invoked when application execution is being suspended. Application state is saved /// without knowing whether the application will be terminated or resumed with the contents /// of memory still intact. /// </summary> /// <param name="sender">The source of the suspend request.</param> /// <param name="e">Details about the suspend request.</param> void App_Suspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); PagesUtils.ChangePlayState(MediaElementState.Paused); DACFactory.Instance.Quit(); deferral.Complete(); }
private void itemGridView_ItemClick(object sender, ItemClickEventArgs e) { var dataItem = e.ClickedItem as ChannelRecommendListItem; if (dataItem != null) { this.Frame.Navigate(typeof(DetailPage), dataItem.ChannelId); } var channelType = e.ClickedItem as ChannelTypeItem; if (channelType != null) { PagesUtils.ChannelTypeNavagite(this, channelType); } }
void App_Resuming(object sender, object e) { DACFactory.Instance.StartUp(); PagesUtils.ChangePlayState(MediaElementState.Playing); }