<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:prism="http://prismlibrary.com"
             prism:ViewModelLocator.AutowireViewModel="True"
             Title="Action Sheet"
             Padding="15"
             x:Class="HelloPageDialog.Views.ActionSheetDemoPage">
  <Grid RowDefinitions="Auto,*,Auto,Auto"
        Padding="15">
    <StackLayout>
      <Label Text="Title" />
      <Entry Text="{Binding Title}" />
      <Label Text="Flow Direction" />
      <Picker ItemsSource="{Binding FlowDirections}"
            ItemDisplayBinding="{Binding .,StringFormat='{0}'}"
            SelectedItem="{Binding FlowDirection}" />
    </StackLayout>
    <CollectionView ItemsSource="{Binding Actions}"
                    Grid.Row="1">
      <CollectionView.Header>
        <StackLayout>
          <Label Text="Add Action Button Text" />
          <Entry Text="{Binding Message}" />
          <Button Text="Add"
                  Command="{Binding AddCommand}" />
        </StackLayout>
      </CollectionView.Header>
      <CollectionView.EmptyView>
        <Label Text="Please add some actions"
               TextColor="Gray"
               HorizontalTextAlignment="Center" />
      </CollectionView.EmptyView>
      <CollectionView.ItemTemplate>
        <DataTemplate>
          <Label Text="{Binding .}" />
        </DataTemplate>
      </CollectionView.ItemTemplate>
    </CollectionView>
    <Button Text="Clear"
            Command="{Binding ClearCommand}"
            Grid.Row="2" />
    <Button Text="Diplay Action Sheet"
            Command="{Binding ShowActionSheetCommand}"
            Grid.Row="3" />
  </Grid>
</ContentPage>
