WPF tab control and MVVM selection

前端 未结 4 1375
遥遥无期
遥遥无期 2020-12-29 04:44

I have a TabControl in an MVVM WPF application. It is defined as follows.



        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-29 05:16

    Just FYI, I gone through the same issue where I add tabs dynamically using ObservableCollection source but last added Tab do not get selected. I have done same changes what Sheridan said to select Tab as per SelectedIndex. Now last added Tab gets selected but it was not getting focused. So to focus the Tab we have to add set Binding IsAsync property True.

    
    

提交回复
热议问题