Guest User

Untitled

a guest
Jul 23rd, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. <Grid>
  2. <ListView
  3. ItemsSource="{Binding Operations}"
  4. HasUnevenRows="True"
  5. SeparatorVisibility="None"
  6. IsGroupingEnabled="True"
  7. >
  8. <ListView.ItemTemplate>
  9. <DataTemplate x:Key="OperationTemplate">
  10. <ViewCell>
  11. <ContentView Margin="0,2,0,2">
  12. <Grid>
  13. <Label Text="{Binding OperationName}"/>
  14. <Label Text="{Binding OperationStatus}"/>
  15. </Grid>
  16. </ContentView>
  17. </ViewCell>
  18. </DataTemplate>
  19. </ListView.ItemTemplate>
  20. </ListView>
  21. </Grid>
  22.  
  23. namespace TestProj.ViewModels.Operations
  24.  
  25. public class OperationHistoryModel
  26. {
  27. public string OperationName { get; set; }
  28. public string OperationStatus { get; set; }
  29. }
  30.  
  31. public ICollection<OperationHistoryModel> Operations
  32. {
  33. get
  34. {
  35. return _operations;
  36. }
  37. set { _operations = value }
  38. }
  39.  
  40. _operations = new List<OperationHistoryModel>();
  41.  
  42. _operations.Add(new OperationHistoryModel
  43. {
  44. OperationName = "test",
  45. OperationStatus = "value",
  46. });
  47. _operations.Add(new OperationHistoryModel
  48. {
  49. OperationName = "test2",
  50. OperationStatus = "value2",
  51. });
Add Comment
Please, Sign In to add comment