コード例 #1
0
        void WatchForScrollBarVisible(object sender, EventArgs e)
        {
            if (CommentScrollViewer.ComputedVerticalScrollBarVisibility == System.Windows.Visibility.Visible)
            {
                CommentScrollViewer.ScrollToBottom();

                var viewModel     = (ICommentThreadViewModel)DataContext;
                var messageFormat = InlineReviews.Resources.CommentTooltipStatusOverflowMessage;
                var message       = string.Format(messageFormat, viewModel.Comments.Count);
                StatusTextBlock.Text = message;
                CommentScrollViewer.LayoutUpdated -= WatchForScrollBarVisible;
            }
        }
コード例 #2
0
ファイル: Courstack.xaml.cs プロジェクト: Emma11111/UWP
        //点击某个公选课
        private void CourseListView_ItemClick(object sender, ItemClickEventArgs e)
        {
            noneCommentBlock.Visibility = Visibility.Collapsed;
            ViewModel.SelectedItem      = (Model.CourseItem)(e.ClickedItem);

            int width = (int)Math.Floor(Window.Current.Bounds.Width);

            if (width <= 950)
            {
                ((App)App.Current).myframe.Navigate(typeof(CommentPage), ViewModel);
            }
            else
            {
                setInfo();
                getComments();
                CommentScrollViewer.ChangeView(null, 0, null);
            }
        }