[NUI] Pass SelectionChangedEventArgs by default as SelectionChangedCommandParameter.
[platform/core/csapi/tizenfx.git] / test / NUITizenGallery / Examples / CollectionViewTest / AnimalGridPage.xaml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <ContentPage x:Class="NUITizenGallery.AnimalGridPage"
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="AnimalGridPage"/>
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="SingleAlways"
30               SelectionChangedCommand="{Binding SelectedAnimalChangedCommand}">
31
32                 <CollectionView.ItemsLayouter>
33                       <GridLayouter />
34                 </CollectionView.ItemsLayouter>
35                 <CollectionView.ItemTemplate>
36                       <DataTemplate>
37                             <DefaultGridItem
38                                 WidthSpecification="230"
39                                 HeightSpecification="200"
40                                 Text="{Binding Path=Name}"
41                                 ResourceUrl="{Binding Path=ImagePath}">
42                                 <DefaultGridItem.Badge>
43                                     <CheckBox />
44                                 </DefaultGridItem.Badge>
45                             </DefaultGridItem>
46                       </DataTemplate>
47                 </CollectionView.ItemTemplate>
48
49
50             </CollectionView>
51         </View>
52     </ContentPage.Content>
53 </ContentPage>