I have a image control named "imgGameList" inside a LongListSelector DataTemplate which I would like to access from code, but I can't find the control from code.
My LongListSelector with my image control:
<phone:LongListSelector Name="llsGameList" ItemsSource="{Binding}" Tap="llsGameList_Tap" Margin="0,90,0,0">
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<Grid>
<Image Name="imgGameList" Margin="0,10,0,10" Stretch="Fill" HorizontalAlignment="Left" VerticalAlignment="Top" Height="200" Width="150">
<Image.Source>
<BitmapImage UriSource="{Binding BoxArtFrontThumb}"
CreateOptions="BackgroundCreation" DecodePixelHeight="200" DecodePixelWidth="150" />
</Image.Source>
</Image>
</Grid>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
The reason why I'm trying to access the image control is because I'm facing memory issues with it and would like to apply gleb.kudr fix to it: Why do I get an OutOfMemoryException when I have images in my ListBox?
I hope there is someone that can help me. Thanks.