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

How to access a named control inside a XAML DataTemplate in Code Behind Page

$
0
0

I have a Listview. It contains some controls like Image,Label. When tapping on image I need to perform some action. But i'm unable get the control in Code Behind. I given x:Name to Image control. Please help me.
Here the code.


<ListView.ItemTemplate>





How can I access x:Name="checkBox" in Code Behind.
I used this.checkBox.Source = "uncheck.png"; in Code Behind. But it's throwing an error Page does not contain a defenation for checkbox.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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