PurchaseOrderListView.xaml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <ContentView xmlns="http://xamarin.com/schemas/2014/forms"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. xmlns:mobile="clr-namespace:InABox.Mobile;assembly=InABox.Mobile.Shared"
  5. xmlns:local="clr-namespace:PRS.Mobile;assembly=PRS.Mobile"
  6. x:Class="PRS.Mobile.PurchaseOrderListView">
  7. <ContentView.Resources>
  8. <local:PurchaseOrderStatusConverter x:Key="PurchaseOrderStatusConverter"/>
  9. </ContentView.Resources>
  10. <ContentView.Content>
  11. <Grid
  12. RowSpacing="5"
  13. Margin="5">
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="Auto"/>
  16. <RowDefinition Height="*"></RowDefinition>
  17. </Grid.RowDefinitions>
  18. <mobile:MobileSearchBar
  19. x:Name="_search"
  20. Grid.Row="0"
  21. TextChanged="_search_OnTextChanged"></mobile:MobileSearchBar>
  22. <mobile:MobileCollectionView
  23. x:Name="_list"
  24. Grid.Row="1"
  25. PullToRefresh="True"
  26. RefreshRequested="_list_OnRefreshRequested"
  27. HasUnevenRows="False">
  28. <mobile:MobileCollectionView.ItemTemplate>
  29. <DataTemplate x:DataType="local:PurchaseOrderShell">
  30. <Frame
  31. BorderColor="Gray"
  32. CornerRadius="5"
  33. Padding="2"
  34. HasShadow="False"
  35. HeightRequest="80">
  36. <Frame.GestureRecognizers>
  37. <TapGestureRecognizer Tapped="_list_ItemTapped" />
  38. </Frame.GestureRecognizers>
  39. <Grid
  40. RowSpacing="0"
  41. ColumnSpacing="2">
  42. <Grid.RowDefinitions>
  43. <RowDefinition Height="auto"/>
  44. <RowDefinition Height="*"/>
  45. <RowDefinition Height="auto"/>
  46. </Grid.RowDefinitions>
  47. <Grid.ColumnDefinitions>
  48. <ColumnDefinition Width="Auto"/>
  49. <ColumnDefinition Width="*"/>
  50. <ColumnDefinition Width="Auto"/>
  51. </Grid.ColumnDefinitions>
  52. <Label
  53. Grid.Row="0"
  54. Grid.Column="0"
  55. HorizontalOptions="Start"
  56. VerticalOptions="Center"
  57. Text="{Binding PONumber}"
  58. FontAttributes="Bold"
  59. FontSize="Small"
  60. />
  61. <Label
  62. Grid.Row="0"
  63. Grid.Column="1"
  64. HorizontalOptions="Start"
  65. VerticalOptions="Center"
  66. Text="{Binding SupplierName}"
  67. FontAttributes="Bold"
  68. FontSize="Small"
  69. />
  70. <Label
  71. Grid.Row="1"
  72. Grid.Column="0"
  73. Grid.ColumnSpan="3"
  74. MaxLines="3"
  75. HorizontalOptions="Start"
  76. VerticalOptions="Start"
  77. Text="{Binding Notes}"
  78. FontSize="Micro"
  79. FontAttributes="Italic"
  80. />
  81. <Label
  82. Grid.Row="2"
  83. Grid.Column="0"
  84. Grid.ColumnSpan="2"
  85. HorizontalOptions="Start"
  86. VerticalOptions="Center"
  87. Text="{Binding ., Converter={StaticResource PurchaseOrderStatusConverter}}"
  88. FontSize="Micro"/>
  89. <Label
  90. Grid.Row="2"
  91. Grid.Column="2"
  92. HorizontalOptions="End"
  93. VerticalOptions="Center"
  94. Text="{Binding DueDate, StringFormat='Due: {0:dd MMM yy}'}"
  95. FontSize="Micro"/>
  96. </Grid>
  97. </Frame>
  98. </DataTemplate>
  99. </mobile:MobileCollectionView.ItemTemplate>
  100. </mobile:MobileCollectionView>
  101. </Grid>
  102. </ContentView.Content>
  103. </ContentView>