當前位置: 首頁>>代碼示例>>C#>>正文


C# Controls.ScrollViewerViewChangedEventArgs類代碼示例

本文整理匯總了C#中Windows.UI.Xaml.Controls.ScrollViewerViewChangedEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# ScrollViewerViewChangedEventArgs類的具體用法?C# ScrollViewerViewChangedEventArgs怎麽用?C# ScrollViewerViewChangedEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ScrollViewerViewChangedEventArgs類屬於Windows.UI.Xaml.Controls命名空間,在下文中一共展示了ScrollViewerViewChangedEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: _scrollViewer_ViewChanged

 private void _scrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
 {
     if (!e.IsIntermediate) // scroll completed
     {
         Debug.WriteLine(_itemsWrapGrid?.FirstVisibleIndex);
     }
 }
開發者ID:HppZ,項目名稱:UniversalTest,代碼行數:7,代碼來源:BlankPage6.xaml.cs

示例2: Products_OnScrollViewerViewChanged

        private async void Products_OnScrollViewerViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
        {
            Domain.ViewModels.Search vm = (Domain.ViewModels.Search)this.DataContext;
            ScrollViewer sv = (ScrollViewer)sender;

            if (!vm.IsLoading)
            {
                var verticalOffset = sv.VerticalOffset;
                var maxVerticalOffset = sv.ExtentHeight - sv.ViewportHeight;

                if (maxVerticalOffset < 0 ||
                    verticalOffset == maxVerticalOffset)
                {
                    // Scrolled to bottom
                    if (vm.Products.Count > 18)
                        await vm.MoreProducts();

                }
                else
                {
                    // Not scrolled to bottom
                    // rect.Fill = new SolidColorBrush(Colors.Yellow);
                }

            }
        }
開發者ID:wuchangqi,項目名稱:ifixit-microsoft,代碼行數:26,代碼來源:SearchResult.xaml.cs

示例3: TypedSender_ViewChanged

 private static void TypedSender_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
 {
     ScrollViewer typedSender = (ScrollViewer)sender;
     if (Abs(typedSender.HorizontalOffset - LastOffsets[typedSender].Item2) > 5)
         LastOffsets[typedSender] = new Tuple<double, double>(LastOffsets[typedSender].Item2, typedSender.HorizontalOffset);
     if (!e.IsIntermediate)
     {
         List<double> snapOffsets = new List<double>();
         double snap = GetSnapInterval(typedSender);
         double offset = typedSender.HorizontalOffset;
         for (double i = 0; i < typedSender.ScrollableWidth; i += snap)
         {
             snapOffsets.Add(i);
         }
         snapOffsets.Add(typedSender.ScrollableWidth);
         double newOffset;
         if (offset > typedSender.ScrollableWidth)
             newOffset = typedSender.ScrollableWidth;
         else if (offset < 0)
             newOffset = 0;
         else if (LastOffsets[typedSender].Item2 - LastOffsets[typedSender].Item1 > 0)
             newOffset = snapOffsets.First(off => off >= offset);
         else
             newOffset = snapOffsets.Last(off => off <= offset);
         ((ScrollViewer)typedSender).ChangeView(newOffset, null, null, false);
     }
 }
開發者ID:AlexKven,項目名稱:OneAppAway-,代碼行數:27,代碼來源:ScrollViewerSnapping.cs

示例4: ScrollViewer_Vertical_ViewChanged

        private void ScrollViewer_Vertical_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
        {
            var verticalOffset = _scrollViewer.VerticalOffset;
            var maxVerticalOffset = _scrollViewer.ScrollableHeight;

            CallCommandIfEndReached(verticalOffset, maxVerticalOffset);
        }
開發者ID:ImaginationOverflow,項目名稱:blog,代碼行數:7,代碼來源:LoadMoreDataAtScrollEndBehavior.cs

示例5: _outerSv_ViewChanged

        private void _outerSv_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
        {
            var sv = sender as ScrollViewer;


            if (sv.VerticalOffset == 0.0f)
                textBlock1.Opacity = 1;
            else
                textBlock1.Opacity = 0.3f;

            if (sv.VerticalOffset != 0.0f)
                _isPullRefresh = true;

            if (!e.IsIntermediate)
            {
                if (sv.VerticalOffset == 0.0f && _isPullRefresh)
                {
                    Windows.UI.Core.CoreWindow.GetForCurrentThread().Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                    {
                        _galleryList.ClearValue(ListView.SelectedItemProperty);
                        AppPCL.MainVM.OnNeedToGoBack();
                    });
                }
                _isPullRefresh = false;
                //sv.ChangeView(null, 60.0f, null);
            }
        }
開發者ID:sinhpham,項目名稱:PhotoGlider,代碼行數:27,代碼來源:RedditImageUserControl.xaml.cs

示例6: MainScrollViewerOnViewChanged

 private void MainScrollViewerOnViewChanged(object sender, ScrollViewerViewChangedEventArgs scrollViewerViewChangedEventArgs)
 {
     if (MainScrollViewer.HorizontalOffset >= MainScrollViewer.ScrollableWidth - 100 && !isLoading)
     {
         LoadMore();
     }
 }
開發者ID:kusl,項目名稱:vlcwinrt,代碼行數:7,代碼來源:SpecialThanks.xaml.cs

示例7: ScrollViewer_ViewChanged

 private void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
 {
     ScrollViewer sv = sender as ScrollViewer;
     if (sv.VerticalOffset == 0)
     {
         SV1.DirectManipulationCompleted += SV1_DirectManipulationCompleted;
         VisualStateManager.GoToState(this, "Refreshing", false);
     }
 }
開發者ID:nksato,項目名稱:Windows-universal-samples,代碼行數:9,代碼來源:MainPage.xaml.cs

示例8: ViewerOnViewChanged

 private void ViewerOnViewChanged(object sender, ScrollViewerViewChangedEventArgs scrollViewerViewChangedEventArgs)
 {
     ScrollViewer view = (ScrollViewer)sender;
     double progress = view.VerticalOffset / view.ScrollableHeight;
     if (progress > 0.7 && LoadCommand != null && LoadCommand.CanExecute(null))
     {
         LoadCommand.Execute(null);
     }
 }
開發者ID:QuickBlox,項目名稱:q-municate-dotnet,代碼行數:9,代碼來源:ListViewIncrementalLoadingBehavior.cs

示例9: ScrollViewer_ViewChanged

        private void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
        {
            ScrollViewer sv = sender as ScrollViewer;
            if (sv.VerticalOffset == 0)
            {
                timer.Start();
                VisualStateManager.GoToState(this, "Refreshing", false);
            }

        }
開發者ID:mhdubose,項目名稱:Windows-universal-samples,代碼行數:10,代碼來源:MainPage.xaml.cs

示例10: SV_ViewChanged

 private void SV_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
 {
     var sV = (ScrollViewer)sender;
     if (verticalOffset > 0 && sV.VerticalOffset == 0)
     {
         // offset hasn't moved
         sV.ChangeView(null, verticalOffset, null, true);
     }
     verticalOffset = sV.VerticalOffset;
 }
開發者ID:boubou10,項目名稱:HFR10,代碼行數:10,代碼來源:ScrollLockListView.cs

示例11: OnScrollViewerViewChanged

        private void OnScrollViewerViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
        {
            var verticalOffset = sv.VerticalOffset;
            var maxVerticalOffset = sv.ScrollableHeight;

            if (maxVerticalOffset < 0 || verticalOffset == maxVerticalOffset)
            {
                VideoGetNextPage();
            }
        }
開發者ID:dominic-maas,項目名稱:WinBeta-Video,代碼行數:10,代碼來源:MainPage.xaml.cs

示例12: sChanged

        private async void sChanged(object sender, ScrollViewerViewChangedEventArgs sve)
        {
            await Task.Run(async() =>
            {
                ScrollViewer sv = (ScrollViewer)sender;
                //Debug.WriteLine(sv.ScrollableHeight + " , " + sv.VerticalOffset);

                if (sv.VerticalOffset >= sv.ScrollableHeight - 2000 && !loading)
                {
                    loading = true;
                    /*App.Progress.IsActive = true;
                    App.Progress.Visibility = Windows.UI.Xaml.Visibility.Visible;*/

                    FacebookClient _fb = new FacebookClient(session.accessToken);
                    dynamic parameters = new ExpandoObject();
                    parameters.access_token = session.accessToken;
                    dynamic result = null;

                    try
                    {
                        result = await _fb.GetTaskAsync(nextPage, parameters);
                    }
                    catch (FacebookOAuthException e)
                    {
                        Debug.WriteLine("Problem: " + e.StackTrace);
                        /*App.Progress.IsActive = false;
                        App.Progress.Visibility = Windows.UI.Xaml.Visibility.Collapsed;*/
                        loading = false;
                        return;
                    }

                    var friendResult = (IDictionary<string, object>)result;
                    var data = (IEnumerable<object>)friendResult["data"];

                    foreach (var item in data)
                    {
                        var posts = (IDictionary<string, object>)item;
                        await this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                        {
                            FacebookPost post = new FacebookPost(posts, session.userSession);
                            feedStack.Children.Add(post);
                        });

                    }

                    Debug.WriteLine(friendResult + "\n\n" + nextPage);

                    nextPage = (String)((IDictionary<string, object>)friendResult["paging"])["next"];

                    /*App.Progress.IsActive = false;
                    App.Progress.Visibility = Windows.UI.Xaml.Visibility.Collapsed;*/
                    loading = false;
                }
            });
        }
開發者ID:tylorhl,項目名稱:FeedMaster,代碼行數:55,代碼來源:FacebookFeed.xaml.cs

示例13: svMarket_ViewChanged

 private void svMarket_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
 {
     if(svMarket.VerticalOffset == 0)
     {
         MarketVm.LoadMoreMarket(TYPEGET.MORE, TYPE.NEW);
     }
     else if (svMarket.VerticalOffset >= svMarket.ScrollableHeight)
     {
         MarketVm.LoadMoreMarket(TYPEGET.MORE);
     }
 }
開發者ID:monpham2310,項目名稱:PayBay,代碼行數:11,代碼來源:MarketListPage.xaml.cs

示例14: Viewer_ViewChanged

 private async void Viewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
 {
     ScrollViewer view = (ScrollViewer)sender;
     double progress = view.VerticalOffset / view.ScrollableHeight;
     if(progress > 0.9 && !isLoadingNewsFeed)
     {
         isLoadingNewsFeed = true;
         offset = NewsFeedList.Items.Count;
         await getNewsFeed();
     }
 }
開發者ID:seymurramizli,項目名稱:Professionals,代碼行數:11,代碼來源:Home.xaml.cs

示例15: ScrollViewer_ViewChanged

 private void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
 {
     ScrollViewer scrollviewer = (ScrollViewer)sender;
     if (scrollviewer.VerticalOffset >= scrollviewer.ScrollableHeight)
     {
         if (_ArchivedTaskViewModel.Hasmoretasks)
         {
             _ArchivedTaskViewModel.LoadArchviedTasks();
         }
     }
 }
開發者ID:xtanuiha,項目名稱:Worktile-For-WP8.1,代碼行數:11,代碼來源:ArchivedTaskPage.xaml.cs


注:本文中的Windows.UI.Xaml.Controls.ScrollViewerViewChangedEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。