Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Listview Group Header Spacing

$
0
0

I'm trying to add some spacing between a group header and the item above it, instead of each item and header butting up against eachother.

I'm able to do this on android with a margin in the following xaml and result:

  <ListView x:Name="ChecklistList" ItemsSource="{Binding ChecklistItems}" IsGroupingEnabled="true" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" HasUnevenRows="True" ItemTapped="ItemTapped" BackgroundColor="Transparent">
    //etc etc
    <ListView.GroupHeaderTemplate>
      <DataTemplate>
        <ViewCell>
          <StackLayout Orientation="Horizontal" BackgroundColor="#417CCC" Margin="0,15,0,0">
            <Label Text="{Binding Name}" FontSize="Medium" FontAttributes="Bold" TextColor="{StaticResource textColor}" HorizontalOptions="StartAndExpand" VerticalOptions="Center" Margin="4,4,4,4" />
          </StackLayout>
        </ViewCell>
      </DataTemplate>
    </ListView.GroupHeaderTemplate>
    //etc etc
  </ListView>

But, the result on iOS always shows white in the background, regardless of what background color settings I apply.

I've tried a bunch of different combinations of settings, and can't seem to get rid of it no matter what I do... Any thoughts? I'd love to be able to do it without renderers if possible


Viewing all articles
Browse latest Browse all 89864

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>