コード例 #1
0
        private void Title_Tapped(object sender, TappedRoutedEventArgs e)
        {
            var            text     = ((TextBlock)sender).Text;
            HNewsItemModel tmpModel = findByTitle(text);

            if (tmpModel != null)
            {
                this.Frame.Navigate(typeof(HNStorieDetailsPage), tmpModel);
            }
            else
            {
                return;
            }
        }
コード例 #2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            //Set the sceen for the back navigation
            SystemNavigationManager systemNavigationManager = SystemNavigationManager.GetForCurrentView();

            systemNavigationManager.BackRequested += OnBackRequested;
            systemNavigationManager.AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;

            if (e.Parameter is HNewsItemModel)
            {
                story = (HNewsItemModel)e.Parameter;
                tryLoadContent();
            }
            else
            {
                story = new HNewsItemModel();
            }
        }