I have a listbox in a Silverlight C# app which is binded to some data from a database in XAML:
<StackPanel>
<TextBlock x:Name="ItemText" Text="{Binding Name}" Foreground="White" FontSize="35" TextAlignment="Left"/>
<TextBlock x:Name="DetailsText" Text="{Binding Description}" Foreground="Gray" Margin="0,-6,0,3" />
</StackPanel>
Now in code behind file, i am trying to get the string "Name" (binded above) based on the selection user makes in the listbox.
I tried the SelectedIndex property of listbox but it only returns integer. Can anyone help me?