We're trying to add a separator between items in a ListView
. Our items are ImageCell
objects.
Here is the XAML code I try to use to add a border in the template:
<ListView x:Name="MenuListView"
VerticalOptions="FillAndExpand"
BackgroundColor="Transparent"
ItemTapped="MenuTapped">
<ListView.ItemTemplate>
<DataTemplate>
<ImageCell Text="{Binding Text}"
ImageSource="{Binding ImageSource}"
TextColor="#006cb7" />
<BoxView WidthRequest="100"
HeightRequest="2"
Color="#aaaaaa"
Scale="100" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
This generates an exception System.ArgumentException: An element with the same key already exists in the dictionary.
Is it something that I am missing?
Also, is there a simpler way to add those separators? I was told they are native, but I don't see them.
See attached files.
We use Xamarin.Forms 1.3 pre-3