NotificationList.xaml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. x:Class="comal.timesheets.NotificationList"
  5. Title="Notifications">
  6. <timesheets:BasePage.ActionButtons>
  7. <ImageButton Source="tick" Clicked="DismissAll_Clicked"/>
  8. </timesheets:BasePage.ActionButtons>
  9. <timesheets:BasePage.PageContent>
  10. <StackLayout>
  11. <Grid Margin="5">
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="3*"/>
  14. <ColumnDefinition Width="2*"/>
  15. </Grid.ColumnDefinitions>
  16. <Label Grid.Column="0" x:Name="numberOfItemsLbl" Margin="5,0, 0, 0"
  17. Text="Number of items: 0" LineBreakMode="WordWrap" HorizontalOptions="Start" VerticalOptions="Center" FontAttributes="Bold" FontSize="Medium"/>
  18. <Button Grid.Column="1" Clicked="New_Clicked" Margin="0,0, 5, 0"
  19. Text="New" BackgroundColor="#15C7C1" CornerRadius="10" TextColor="White" VerticalOptions="Center" HorizontalOptions="FillAndExpand"/>
  20. </Grid>
  21. <ListView x:Name="notificationListView" HasUnevenRows="True" BackgroundColor="Transparent" Margin="0,0,0,0">
  22. <ListView.ItemTemplate>
  23. <DataTemplate>
  24. <ViewCell Tapped="NotificationListView_Tapped">
  25. <Frame Padding="5" BorderColor="#15C7C1" Margin="1" CornerRadius="10" HasShadow="False">
  26. <StackLayout Orientation="Vertical">
  27. <Grid >
  28. <Grid.ColumnDefinitions>
  29. <ColumnDefinition Width="30"/>
  30. <ColumnDefinition Width="*"/>
  31. <ColumnDefinition Width="Auto"/>
  32. <ColumnDefinition Width="Auto"/>
  33. </Grid.ColumnDefinitions>
  34. <Image Grid.Column="0" Source="user.png" HeightRequest="30" WidthRequest="30"/>
  35. <Label Grid.Column="1" VerticalOptions="Center"
  36. Text="{Binding Sender}" FontAttributes="Bold" FontSize="Medium" TextColor="#873260"/>
  37. <Label Grid.Column="2"
  38. Text="{Binding Created, StringFormat='{}{0:dd MMM yy}'}" FontAttributes="Bold" HorizontalTextAlignment="End"/>
  39. <Image Grid.Column="3" Source="paperclip.png" HeightRequest="30" WidthRequest="30" IsVisible="{Binding ImageVisible}"
  40. VerticalOptions="Center" HorizontalOptions="Center"/>
  41. </Grid>
  42. <Label LineBreakMode="WordWrap" MaxLines="2"
  43. Text="{Binding Title}" FontAttributes="Bold"/>
  44. <Label LineBreakMode="WordWrap" Text="{Binding Description}" MaxLines="3"/>
  45. </StackLayout>
  46. </Frame>
  47. </ViewCell>
  48. </DataTemplate>
  49. </ListView.ItemTemplate>
  50. </ListView>
  51. </StackLayout>
  52. </timesheets:BasePage.PageContent>
  53. </timesheets:BasePage>