I have a ListBox, here i am binding IList Like (Cities).
I want an event like OnItemDataBound in .NET in Windows Phone7.
Like when every city was binded (if 10 cities are this event will fire 10 times) this event will fire so that i have to do some more calculations on this event. In this event i have to find the object binded to the ListItem so that i can make some calculations. Is there any event in WP7 similar OnItemDataBound in .NET.
<ListBox Loaded="lstFlights_Loaded" Height="635" x:Name="lstFlights"
ScrollViewer.VerticalScrollBarVisibility="Auto" Grid.Row="1">
<ListBox.ItemTemplate>
<DataTemplate>
<Border CornerRadius="10" Margin="10">
<Border.Background>
<ImageBrush ImageSource="../Images/rowbg.png"></ImageBrush>
</Border.Background>
//Some data here
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
i am binding the data like below:
lstFlights.ItemsSource = objCities;
on Binding every city i want an event to populate some list items(like: i want to change the textblock text,etc) according to the City that binded to ListItem. To do this I need an event like OnItemDataBound in WP7. And I have list picker like below:
On SelectionChanged event also i want to change the list items.
And one more thing IList(objCities) is coming from the Service so I can't change that Object so if i want to change any TextBlock in List Box i have do FindName and i have to assign calculated value for every city binded.