I've got MyDataGrid
, derived from DataGrid
in ContentTemplate
of TabItem
:
<TabControl.ContentTemplate>
<DataTemplate>
<MyDataGrid ItemsSource={Binding CurrentTab.Collection}>
...
</MyDataGrid>
</DataTemplate>
</TabControl>
(CurrentTab
is current model object in my ViewModel and Collection
is ObservableCollection
). The issue is that when I switch tab item to another and switch back to first one, items that were selected/in view port aren't selected and DataGrid
is scrolled to the start.
Also: WPF TabControl and DataGrid bugs, bugs and bugs (first "bug")