本文整理汇总了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);
}
}
示例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);
}
}
}
示例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);
}
}
示例4: ScrollViewer_Vertical_ViewChanged
private void ScrollViewer_Vertical_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
{
var verticalOffset = _scrollViewer.VerticalOffset;
var maxVerticalOffset = _scrollViewer.ScrollableHeight;
CallCommandIfEndReached(verticalOffset, maxVerticalOffset);
}
示例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);
}
}
示例6: MainScrollViewerOnViewChanged
private void MainScrollViewerOnViewChanged(object sender, ScrollViewerViewChangedEventArgs scrollViewerViewChangedEventArgs)
{
if (MainScrollViewer.HorizontalOffset >= MainScrollViewer.ScrollableWidth - 100 && !isLoading)
{
LoadMore();
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例11: OnScrollViewerViewChanged
private void OnScrollViewerViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
{
var verticalOffset = sv.VerticalOffset;
var maxVerticalOffset = sv.ScrollableHeight;
if (maxVerticalOffset < 0 || verticalOffset == maxVerticalOffset)
{
VideoGetNextPage();
}
}
示例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;
}
});
}
示例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);
}
}
示例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();
}
}
示例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();
}
}
}