Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Seperator ListView View cells Xamarin.Forms

I have a ListView in my project using Xamarin.Forms. Iam using ViewCellsto display the data.

Right now, There is a seperator line showing between two ViewCells. There a way I can remove it so that two ViewCells are always touching each other.

I tried using SeperatorVisibility="None", but it made no difference.

Here is my code:

 <ListView x:Name="AList"
                StyleId="AList"
                      Grid.Row="0"
                RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width}"
                RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height}"
                      IsVisible="{Binding IsProcessing, Mode=OneWay, Converter={StaticResource booleanNegationConverter}}"
                SeparatorVisibility="None">
        <ListView.BackgroundColor>
          <OnPlatform x:TypeArguments="Color" iOS="Transparent" />
        </ListView.BackgroundColor>

        <ListView.RowHeight>
          <OnPlatform x:TypeArguments="x:Int32" iOS="150" Android="150" WinPhone="170" />
        </ListView.RowHeight>
        <ListView.ItemTemplate>
          <DataTemplate>
            <ViewCell > .......</ViewCell></ListView>
like image 450
user3034944 Avatar asked Dec 11 '22 23:12

user3034944


2 Answers

SeperatorVisibility="None" usually does it for me.

Are you seeing this on all platforms?

Does your view cell contain anything that might be causing it? Try switching to a standard TextCell and see if you get the seperator.

like image 163
breps Avatar answered May 16 '23 08:05

breps


Use SeparatorColor attribute in ListView

<ListView SeparatorColor="Transparent">
</ListView>
like image 43
Mohamathu Rafi Avatar answered May 16 '23 08:05

Mohamathu Rafi