Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private async void Switch_Toggled(object sender, ToggledEventArgs e)
- {
- Tasks task = (sender as Switch).BindingContext as Tasks;
- await ApiManager.UpdateTasksFromListAsync(task);
- }
- <ListView x:Name="lvwDetailPage" SeparatorVisibility="None">
- <ListView.ItemTemplate>
- <DataTemplate>
- <ViewCell>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="70" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition />
- </Grid.RowDefinitions>
- <Switch IsToggled="{Binding completed}" Grid.Column="0" Toggled="Switch_Toggled" />
- <Label Grid.Column="1" Text="{Binding title}" TextColor="#212121" VerticalOptions="Center" Margin="10,0" />
- </Grid>
- </ViewCell>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
Add Comment
Please, Sign In to add comment