[NUI] Pass SelectionChangedEventArgs by default as SelectionChangedCommandParameter.
[platform/core/csapi/tizenfx.git] / test / NUITizenGallery / Examples / CollectionViewTest / AnimalListPage.xaml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <ContentPage x:Class="NUITizenGallery.AnimalListPage"
3   xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
4   xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
5   WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
6   HeightSpecification="{Static LayoutParamPolicies.MatchParent}" >
7
8     <!-- AppBar is top-side bar with navigation content, title, and action. If you not set any contents, back button is automatically added. -->
9     <ContentPage.AppBar>
10         <AppBar x:Name="appBar" Title="AnimalListPage"/>
11     </ContentPage.AppBar>
12
13     <!-- Content is main placeholder of ContentPage. Add your content into this view. -->
14     <ContentPage.Content>
15         <View x:Name="ContentView"
16           WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
17           HeightSpecification="{Static LayoutParamPolicies.MatchParent}">
18
19             <View.Layout>
20                 <LinearLayout LinearOrientation="Vertical" LinearAlignment="Top" CellPadding="10,10" />
21             </View.Layout>
22
23             <CollectionView x:Name="ColView"
24               WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
25               HeightSpecification="{Static LayoutParamPolicies.MatchParent}"
26               ScrollingDirection="Vertical"
27               ItemsSource="{Binding Source}"
28               HideScrollbar="true"
29               SelectionMode="Single"
30               SelectionChangedCommand="{Binding SelectedAnimalChangedCommand}">
31
32                 <CollectionView.ItemsLayouter>
33                       <LinearLayouter />
34                 </CollectionView.ItemsLayouter>
35                 <CollectionView.ItemTemplate>
36                       <DataTemplate>
37                             <DefaultLinearItem
38                                 WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
39                                 Text="{Binding Path=Name}"
40                                 SubText="{Binding Path=ScientificName}">
41                                 <DefaultLinearItem.Icon>
42                                     <ImageView
43                                         WidthSpecification="70"
44                                         HeightSpecification="50"
45                                         ResourceUrl="{Binding Path=ImagePath}" />
46                                 </DefaultLinearItem.Icon>
47                                 <DefaultLinearItem.Extra>
48                                     <CheckBox />
49                                 </DefaultLinearItem.Extra>
50                             </DefaultLinearItem>
51                       </DataTemplate>
52                 </CollectionView.ItemTemplate>
53
54
55             </CollectionView>
56         </View>
57     </ContentPage.Content>
58 </ContentPage>