-
Notifications
You must be signed in to change notification settings - Fork 146
Expand file tree
/
Copy pathIncrementalLoadingCollectionSample.xaml
More file actions
68 lines (64 loc) · 3.07 KB
/
IncrementalLoadingCollectionSample.xaml
File metadata and controls
68 lines (64 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Page x:Class="CollectionsExperiment.Samples.IncrementalLoadingCollectionSample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:CollectionsExperiment.Samples"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid MaxWidth="460"
HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel HorizontalAlignment="Left">
<TextBlock Text="Items are loaded incrementally when the view needs to show them (i.e., when the user scrolls the ListView)"
TextWrapping="Wrap" />
<Button Margin="0,12,0,12"
Click="RefreshCollection"
Content="Refresh collection"
Style="{StaticResource AccentButtonStyle}" />
<TextBlock>
<Run Text="Is loading:" />
<Run FontWeight="SemiBold"
Text="{Binding IsLoading, Mode=OneWay}" />
</TextBlock>
<TextBlock>
<Run Text="Has more items:" />
<Run FontWeight="SemiBold"
Text="{Binding HasMoreItems, Mode=OneWay}" />
</TextBlock>
</StackPanel>
<Grid Grid.Row="2"
MaxHeight="420"
Margin="0,24,0,0"
VerticalAlignment="Top"
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="4">
<ListView x:Name="PeopleListView">
<ListView.ItemTemplate>
<DataTemplate x:DataType="local:Person">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image Width="24"
Height="24"
VerticalAlignment="Center"
Source="ms-appx:///Assets/AppIcon.png" />
<TextBlock Grid.Column="1"
Margin="12"
VerticalAlignment="Center"
Text="{x:Bind Name}" />
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Grid>
</Page>