Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

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.