forked from xamarin/xamarin-forms-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LabelledSectionXaml.xaml
47 lines (44 loc) · 1.82 KB
/
LabelledSectionXaml.xaml
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
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LabelledSections.LabelledSectionXaml"
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
xmlns:viewModel="clr-namespace:LabelledSectionsList;assembly=LabelledSectionsList"
ios:Page.UseSafeArea="true"
>
<ContentPage.BindingContext>
<viewModel:ViewModelSection />
</ContentPage.BindingContext>
<!-- Note: the title is useless without a navigation page-->
<!-- Title = "XAML"-->
<ListView HasUnevenRows="true"
ItemsSource="{Binding PeopleList}"
SelectedItem="{Binding YourSelectedItem, Mode=TwoWay}"
IsGroupingEnabled="true"
Header="HEADER"
Footer="FOOTER">
<ListView.GroupHeaderTemplate>
<DataTemplate>
<ViewCell >
<StackLayout VerticalOptions="FillAndExpand"
BackgroundColor="Black"
>
<Label Text="{Binding LongTitle}"
TextColor="White"
HorizontalOptions="Center"
FontSize="Medium"
/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.GroupHeaderTemplate>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell >
<Label Margin="20,8,0,8"
Text="{Binding Name}" />
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentPage>