Set ListBoxItem.IsSelected when child TextBox is Focused

前端 未结 5 989
难免孤独
难免孤独 2020-12-14 11:48

I have a typical MVVM scenario: I have a ListBox that is binded to a List of StepsViewModels. I define a DataTemplate so that StepViewModels are rendered as StepViews. The

5条回答
  •  无人及你
    2020-12-14 12:03

    If you create a User Control and then use it as the DataTemplate It seems to work cleaner. Then you don't have to use the dirty Style Triggers that Don't work 100% of the time.

提交回复
热议问题