I have a problem with my TreeView
and DataGrid
. The issue is that whenever I click an item in my TreeView
(or DataGrid
), the view horizontally scrolls to the right, I'm guessing, in a bid to make it more visible. I've got some images of my TreeView
below:
Before Item Click:
After Item Click
I'm sure I could disable the Horizontal scrollbar, but I would still like the user to have the option to scroll, just not auto-scroll when an item is clicked.
Any help on this is greatly appreciated and just for the sake of completeness, I've attached my TreeView code below:
<TreeView x:Name="TreeView"
ItemsSource="{Binding Path=FileStubsView}"
SelectedItemChanged="TreeView_OnSelectedItemChanged"
common:MultipleSelectTreeView.PreviewMouseDoubleClick="HandleTreeItemDoubleClick"
Tag="{Binding DataContext,RelativeSource={RelativeSource Mode=Self}}"
Grid.Row="1"
Grid.Column="0"
Margin="0,2,0,0"
TreeViewItem.Expanded="TreeViewItem_Expanded"
TreeViewItem.Collapsed="TreeViewItem_Collapsed" >