Hi I have the following code:
<ListBox x:Name="foldersListBox" Grid.Column="0" MouseLeftButtonUp="foldersListBox_MouseLeftButtonUp"
BorderThickness="0" Height="AUTO"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled">
<DataTemplate>
<Border BorderBrush="LightGray"
BorderThickness="2"
CornerRadius="4">
<Image x:Name="folderImage" Width="70" Height="70" Margin="3" />
</Border>
</DataTemplate>
</ListBox>
Now when I am trying to access folderImage
from code behind. I can use the loaded event and typecast the sender as Image type , but I dont want that way,because I want to bind the image source during runtime binding . So even if we will try on loaded event , thatz not going to help as the control wont be loaded .
Help plz.
Thanks, Subhen