GenericSelectionPage.xaml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <mobile:MobilePage
  3. xmlns="http://xamarin.com/schemas/2014/forms"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  5. xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
  6. xmlns:mobile="clr-namespace:InABox.Mobile;assembly=InABox.Mobile.Shared"
  7. xmlns:local="clr-namespace:PRS.Mobile;assembly=PRS.Mobile"
  8. x:Class="PRS.Mobile.GenericSelectionPage">
  9. <mobile:MobilePage.Resources>
  10. <local:SelectionViewModelImageHeightConverter x:Key="HeightConverter" Value="200" />
  11. </mobile:MobilePage.Resources>
  12. <mobile:MobilePage.PageContent>
  13. <Grid Margin="5">
  14. <Grid.ColumnDefinitions>
  15. <ColumnDefinition Width="*"/>
  16. </Grid.ColumnDefinitions>
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="Auto"/>
  19. <RowDefinition Height="*"/>
  20. </Grid.RowDefinitions>
  21. <mobile:MobileSearchBar Grid.Row="0" Grid.Column="0" TextChanged="MobileSearchBar_OnTextChanged" />
  22. <Frame BorderColor="Gray" Grid.Row="1" Grid.Column="0" CornerRadius="5" HasShadow="false" BackgroundColor="WhiteSmoke" Padding="0" VerticalOptions="FillAndExpand">
  23. <ListView x:Name="_list" VerticalOptions="FillAndExpand" Margin="1" ItemSelected="Item_Selected" HasUnevenRows="True" BackgroundColor="WhiteSmoke" SeparatorVisibility="None">
  24. <ListView.ItemTemplate>
  25. <DataTemplate x:DataType="local:SelectionViewModelItem">
  26. <ViewCell>
  27. <Grid BackgroundColor="WhiteSmoke" RowSpacing="0" >
  28. <Grid.ColumnDefinitions>
  29. <ColumnDefinition Width="*" />
  30. </Grid.ColumnDefinitions>
  31. <Grid.RowDefinitions>
  32. <RowDefinition Height="Auto"/>
  33. <RowDefinition Height="{Binding Image, Converter={StaticResource HeightConverter}}" />
  34. <RowDefinition Height="0.75" />
  35. </Grid.RowDefinitions>
  36. <Label Text="{Binding Display}" VerticalTextAlignment="Center" Margin="5" HorizontalTextAlignment="Center" TextColor="Black" FontSize="Small"/>
  37. <Image Source="{Binding Image}" Grid.Row="1" Margin="0,0,0,5" />
  38. <Line BackgroundColor="Gray" HorizontalOptions="Fill" VerticalOptions="Fill" Grid.Row="2" />
  39. </Grid>
  40. </ViewCell>
  41. </DataTemplate>
  42. </ListView.ItemTemplate>
  43. </ListView>
  44. </Frame>
  45. </Grid>
  46. </mobile:MobilePage.PageContent>
  47. </mobile:MobilePage>