I have a listview (xamarin) with data...and i need when click the listview item, call the popup showing another listview with 2 options.
And i have to get what action was clicked on the popup.
But my code are giving me the error "sequence contains no elements". My Xaml Code
<ContentPage.Content>
<StackLayout>
<ListView Margin="10" x:Name="listView" HasUnevenRows="true" BackgroundColor="White" ItemTapped="ListViewTapped">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="Fill" >
<StackLayout Padding="10,10,10,0" Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<Label Text="{Binding Marca.NomeMarca}" FontAttributes="Bold" TextColor="DeepSkyBlue" Margin="0" VerticalOptions="Center" HorizontalOptions="Start"/>
<Label Text="{Binding Modelo.NomeModelo, StringFormat='{0}'}" FontAttributes="Bold" TextColor="DeepSkyBlue" Margin="0" VerticalOptions="Center" />
<Label Text="{Binding Tamanho, StringFormat='{0}m'}" VerticalOptions="Center" FontAttributes="Bold" Margin="0" TextColor="DeepSkyBlue"/>
<Label Text="{Binding AnoFab}" FontAttributes="Bold" TextColor="DeepSkyBlue" Margin="0" VerticalOptions="Center" />
</StackLayout>
<StackLayout Padding="10,0,10,0" Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<Label Text="{Binding Usuario.Nome, StringFormat='Nome: {0}'}" TextColor="Black" FontAttributes="Bold" VerticalOptions="Center" />
</StackLayout>
<StackLayout Padding="10,0,10,0" Margin="0" Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<Label Text="{Binding Usuario.Email, StringFormat='Email: {0}'}" TextColor="DarkGray" FontAttributes="Bold" Margin="0" VerticalOptions="Center" HorizontalOptions="Start"/>
<Label Text="{Binding Usuario.Telefone, StringFormat='Tel: {0}'}" TextColor="DarkGray" FontAttributes="Bold" Margin="0" VerticalOptions="Center" HorizontalOptions="EndAndExpand"/>
</StackLayout>
<StackLayout Padding="10,0,10,0" Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<Label Text="{Binding NumSerie, StringFormat='Nº de série: {0}'}" Margin="0" VerticalOptions="Center" HorizontalOptions="StartAndExpand"/>
</StackLayout>
<StackLayout Padding="10,0,10,0" Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<Label Text="{Binding Estado, StringFormat='Local: {0}'}" VerticalOptions="Center" HorizontalOptions="StartAndExpand" />
</StackLayout>
<StackLayout Padding="10,0,10,0" Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<Label Text="{Binding Reparos, StringFormat='Reparos: {0}'}" VerticalOptions="Center" />
</StackLayout>
<StackLayout Padding="10,0,10,0" Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<Label Text="{Binding SinalIdentificador, StringFormat='Sinais: {0}'}" VerticalOptions="Center" />
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
<sfPopup:SfPopupLayout x:Name="popupLayout">
<sfPopup:SfPopupLayout.Content>
<StackLayout x:Name="mainLayout">
<ListView Margin="10" x:Name="popupList" HasUnevenRows="true" BackgroundColor="White">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<Grid x:Name="grid" RowSpacing="1">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Image Grid.Row="0" Grid.Column="0" Source="ic_person_add.png"
VerticalOptions="Center"
HorizontalOptions="Center"
HeightRequest="50"/>
<Label Grid.Row="0" Grid.Column="1"
HorizontalTextAlignment="Center"
LineBreakMode="NoWrap"
Text="Adicionar à agenda telefônica" />
<Image Grid.Row="1" Grid.Column="0" Source="ic_mensagem.png"
VerticalOptions="Center"
HorizontalOptions="Center"
HeightRequest="50"/>
<Label Grid.Row="1" Grid.Column="1"
HorizontalTextAlignment="Center"
LineBreakMode="NoWrap"
Text="Enviar e-mail." />
</Grid>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</sfPopup:SfPopupLayout.Content>
</sfPopup:SfPopupLayout>
</ContentPage.Content>
On itemtappedEvent i call popupLayout.Show(mainLayout);
What i am doing wrong ?