Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

ListView - Custom ViewCell - get object from itemsource inside ViewCell

$
0
0

I have a ListView that has Custom ViewCells to display.

I have a class Menu, that represents each row, and I set an List of Menu as ItemsSource of the Listview.
As ItemTemplate I use MenuCell.

The MenuCell class draws itself with different layouts depending on the Menu object.
So if the menu has a Name I can do this and it works perfect:

titleLabel.SetBinding (Label.TextProperty, "Name");

Is there a way to get the Menu object directly without binding it to a label ?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>