Listview ContextActions problem

florianduboisfloriandubois USMember
edited October 2016 in Xamarin.iOS

Hi,

I try to implement context actions on a listview in XAML.

<ListView Grid.Row="1" ItemsSource="{Binding Rooms}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.ContextActions>
<MenuItem Text="More" />
</ViewCell.ContextActions>
<StackLayout >
<Label Text="{Binding Name}" />
<Label Text="{Binding Description}" />
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>

The problem is when i add the ViewCell.ContextActions, the list doesn't render, whereas if i remove the code for the context actions, the list renders correctly with the items from my ViewModel.

Any idea of what I'm doing wrong?

Thank you

Sign In or Register to comment.