I Have a wpf Listbox that display\'s a list of textboxes. When I click on the Textbox the Listbox selection does not change. I have to click next to the TextBox to select th
I don't have enough reps to comment, so I am posting my comment as answer. Grazer's solution above does not work in cases where you have another control such as a Button
that needs the SelectedItem
. This is because as per the Style Trigger
, the IsKeyboardFocusWithin
becomes false when you click on that Button
, and the SelectedItem
becomes null.