I am using a ListView and every row of the list contains a Label and a Switch, there is some margin around the Switch which wishes to remove.
Screenshot:
Xaml:
<ListView ItemsSource="{Binding ListOfEnums}" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" VerticalOptions="FillAndExpand"> <ListView.ItemTemplate> <DataTemplate> <ViewCell> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Label VerticalTextAlignment="Center" Text="{Binding Status, Converter={StaticResource EnumToStringConverter}}" /> <Switch IsToggled="{Binding Selected}" Grid.Column="1" Margin="0,0,20,0" /> </Grid> </ViewCell> </DataTemplate> </ListView.ItemTemplate> </ListView>
What can I do to remove/reduce the spaces between the list rows?
Answers
Hi @jainankit2474 ,
If you wish to decrease the space b/w listview rows then you can use "RowHeight" property of list view.