当前位置: 首页>>代码示例>>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;未经允许,请勿转载。