Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Grid>
- <ListView
- ItemsSource="{Binding Operations}"
- HasUnevenRows="True"
- SeparatorVisibility="None"
- IsGroupingEnabled="True"
- >
- <ListView.ItemTemplate>
- <DataTemplate x:Key="OperationTemplate">
- <ViewCell>
- <ContentView Margin="0,2,0,2">
- <Grid>
- <Label Text="{Binding OperationName}"/>
- <Label Text="{Binding OperationStatus}"/>
- </Grid>
- </ContentView>
- </ViewCell>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Grid>
- namespace TestProj.ViewModels.Operations
- public class OperationHistoryModel
- {
- public string OperationName { get; set; }
- public string OperationStatus { get; set; }
- }
- public ICollection<OperationHistoryModel> Operations
- {
- get
- {
- return _operations;
- }
- set { _operations = value }
- }
- _operations = new List<OperationHistoryModel>();
- _operations.Add(new OperationHistoryModel
- {
- OperationName = "test",
- OperationStatus = "value",
- });
- _operations.Add(new OperationHistoryModel
- {
- OperationName = "test2",
- OperationStatus = "value2",
- });
Add Comment
Please, Sign In to add comment