Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Commit

Permalink
用户作品现可加载
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiichiamane committed May 19, 2019
1 parent 5fe6372 commit 73fa95f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PixivFSUWP/UserDetailPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<ScrollViewer Background="{StaticResource PageBackGround}" x:Name="scrollViewer">
<ScrollViewer Background="{StaticResource PageBackGround}" x:Name="scrollViewer" ViewChanged="ScrollViewer_ViewChanged">
<StackPanel Orientation="Vertical">
<Grid Margin="0,75,0,0" HorizontalAlignment="Stretch" Height="250">
<StackPanel VerticalAlignment="Center"
Expand Down
12 changes: 12 additions & 0 deletions PixivFSUWP/UserDetailPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,17 @@ async Task loadPage()
return;
}
}

private async void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
{
if (scrollViewer.VerticalOffset >= scrollViewer.ScrollableHeight - 500)
{
try
{
await (itemsSource as ISupportIncrementalLoading)?.LoadMoreItemsAsync(0);
}
catch { }
}
}
}
}

0 comments on commit 73fa95f

Please sign in to comment.