Ejemplo n.º 1
0
        private void RecommendTitleTappedMethod(EditorRecommend recommend)
        {
            if (recommend == null || MainStatus == null)
            {
                return;
            }

            if (recommend.Type == "question")
            {
                NavHelper.NavToQuestionPage(recommend.Question.Id, AppShellPage.AppFrame);
                SystemNavigationManager.GetForCurrentView().BackRequested -= FindPage_BackRequested;
            }
            if (recommend.Type == "answer")
            {
                NavHelper.NavToQuestionPage(recommend.Question.Id, AppShellPage.AppFrame);
                SystemNavigationManager.GetForCurrentView().BackRequested -= FindPage_BackRequested;
            }
            if (recommend.Type == "article")
            {
                if (MainStatus.IsWide)
                {
                    SystemNavigationManager.GetForCurrentView().BackRequested -= FindPage_BackRequested;
                }
                else
                {
                    if (this.MainStatus.NavFrame.CanGoBack)
                    {
                        this.MainStatus.NavFrame.GoBack();
                    }
                }

                NavHelper.NavToArticlePage(recommend.Id, MainStatus.NavFrame);
            }
        }
        internal void Clear()
        {
            _item = null;

            Title.ClearValue(TextBlock.TextProperty);
            Avator.ClearValue(Ellipse.FillProperty);
            VoteCount.ClearValue(TextBlock.TextProperty);
            Summary.ClearValue(TextBlock.TextProperty);
        }
        internal void ShowPlaceHolder(EditorRecommend recommend)
        {
            _item = recommend;

            Title.Opacity      = 0;
            Avator.Opacity     = 0;
            VoteBorder.Opacity = 0;
            VoteCount.Opacity  = 0;
            Summary.Opacity    = 0;
        }
Ejemplo n.º 4
0
 private void RecommendAuthorTappedMethod(EditorRecommend recommend)
 {
 }