I've got a listbox with the following data template defined:
<DataTemplate x:Name="MyTemplate">
<StackPanel>
<TextBlock Name="textblock1" Text="{Binding Name}" />
<TextBlock Name="textblock2" Text="{Binding SurName}" />
<StackPanel Name="extrainfo" Visibility="Collapsed">
<TextBlock Name="textblock3" Text="{Binding Address}" />
<TextBlock Name="textblock4" Text="{Binding Phone}" />
<TextBlock Name="textblock5" Text="{Binding Email}" />
</StackPanel>
</StackPanel>
</DataTemplate>
The listbox :
<ListBox Name="myListBox" ItemTemplate="{StaticResource MyTemplate}" ItemsSource="{Binding UserList}" />
The issue is the following; when the user selects an item in the listbox I want to display the additional info by setting the visibility of the stackpanel to visible.
Any idea's how to achieve this (either via xaml or c#)? I tried to alter the storyboard but I did not get very far with that approach.