How to access a specific item in a Listbox with DataTemplate?
问题 I have a ListBox including an ItemTemplate with 2 StackPanels. There is a TextBox in the second StackPanel i want to access. (Change it\'s visibility to true and accept user input) The trigger should be the SelectionChangedEvent. So, if a user clicks on an ListBoxItem, the TextBlock gets invisible and the TextBox gets visible. XAML CODE: <ListBox Grid.Row=\"1\" Name=\"ContactListBox\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" ItemsSource=\"{Binding Contacts}\" Margin=\"0