i have this LongListSelector bound to observerableCollection
<DataTemplate x:Key="ucItems" >
<Grid Margin="0,0,0,17">
<TextBlock Text="{Binding Title}" TextWrapping="Wrap"
Style="{StaticResource MyBigBoldPhoneTextStyle}" />
</Grid>
</DataTemplate>
and
<toolkit:LongListSelector x:Name="ucLongList" IsFlatList="True"
ItemsSource="{Binding UcItem}"
ItemTemplate="{StaticResource ucItems}"
ListHeaderTemplate="{StaticResource ucHeader}"
SelectionChanged="ListBox_SelectionChanged" />
UcItem has 3 property which are: Title, ImageUri, Link
I need to get the selected-ucItem-Link property to pass it to other methods.
how can i do that?
Im new to LongListSelector and i used to get a selected property from SelectedIndex from listbox. And there is no selectedIndex in LongListSelector so i have to use SelectedItem to get the single property on it.
please help thanks.
Here’s the xaml for DateTemplate
Now for codebehind. When you are looping through the selecteditems
So that way the Tag attribute will reference to the instance of UcItem.