PDFList.xaml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <timesheets:BasePage xmlns:timesheets="clr-namespace:comal.timesheets" xmlns="http://xamarin.com/schemas/2014/forms"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. xmlns:ui="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
  5. x:Class="comal.timesheets.PDFList"
  6. Title="Documents">
  7. <timesheets:BasePage.ActionButtons>
  8. <ImageButton x:Name="_upload" Source="add" Clicked="Upload_Clicked" />
  9. </timesheets:BasePage.ActionButtons>
  10. <timesheets:BasePage.PageContent>
  11. <Grid>
  12. <Grid.RowDefinitions>
  13. <RowDefinition Height="Auto" />
  14. <RowDefinition Height="*" />
  15. </Grid.RowDefinitions>
  16. <ui:MaterialLabel
  17. Grid.Row="0"
  18. Text="Tap on a file name to open PDF"
  19. HorizontalOptions="Center"
  20. VerticalOptions="Center"
  21. LineBreakMode="WordWrap"
  22. HorizontalTextAlignment="Center"
  23. TypeScale="H6"
  24. />
  25. <timesheets:MobileList
  26. x:Name="_documents"
  27. Grid.Row="1"
  28. ItemTapped="_documents_OnItemTapped">
  29. <timesheets:MobileList.ItemTemplate>
  30. <DataTemplate x:DataType="timesheets:IDocumentShell">
  31. <ui:MaterialCard
  32. CornerRadius="5"
  33. Elevation="0"
  34. HorizontalOptions="FillAndExpand"
  35. BorderColor="Silver"
  36. Margin="5,0,5,5"
  37. BackgroundColor="White"
  38. Padding="5"
  39. Clicked="MaterialCard_OnClicked"
  40. IsClickable="False">
  41. <Grid
  42. RowSpacing="0"
  43. ColumnSpacing="0">
  44. <Grid.RowDefinitions>
  45. <RowDefinition Height="Auto" />
  46. <RowDefinition Height="Auto" />
  47. </Grid.RowDefinitions>
  48. <Image
  49. Grid.Row="0"
  50. Source="{Binding Thumbnail}"
  51. />
  52. <ui:MaterialLabel
  53. Grid.Row="1"
  54. HorizontalOptions="Fill"
  55. HorizontalTextAlignment="Center"
  56. TypeScale="Body2"
  57. Text="{Binding FileName}" />
  58. </Grid>
  59. </ui:MaterialCard>
  60. </DataTemplate>
  61. </timesheets:MobileList.ItemTemplate>
  62. </timesheets:MobileList>
  63. </Grid>
  64. </timesheets:BasePage.PageContent>
  65. </timesheets:BasePage>