We have a VS 2010 C# VsPackage with a tool window that hosts a WPF user control. The user control has a tab control with 2 tabs, one with a few combo boxes and the other with a list view.
<Grid><TabControl><TabItem Header="tabItem1" Name="tabItem1"><ScrollViewer><Grid><Grid.RowDefinitions><RowDefinition Height="Auto" /><RowDefinition Height="Auto" /><RowDefinition Height="Auto" /><RowDefinition Height="Auto" /><RowDefinition Height="Auto" /><RowDefinition Height="Auto" /><RowDefinition Height="Auto" /><RowDefinition Height="Auto" /></Grid.RowDefinitions><Grid.ColumnDefinitions><ColumnDefinition /><ColumnDefinition /></Grid.ColumnDefinitions><ComboBox Name="comboBox1" Grid.Row="0" Grid.Column="0" Margin="20"><ComboBoxItem Content="comboBoxItem1"/><ComboBoxItem Content="comboBoxItem2" /><ComboBoxItem Content="comboBoxItem3" /><ComboBoxItem Content="comboBoxItem4" /><ComboBoxItem Content="comboBoxItem5" /></ComboBox><ComboBox Name="comboBox2" Grid.Row="1" Grid.Column="0" Margin="20"><ComboBoxItem Content="comboBoxItem1" /><ComboBoxItem Content="comboBoxItem2" /><ComboBoxItem Content="comboBoxItem3" /><ComboBoxItem Content="comboBoxItem4" /><ComboBoxItem Content="comboBoxItem5" /></ComboBox><ComboBox Name="comboBox3" Grid.Row="2" Grid.Column="0" Margin="20"><ComboBoxItem Content="comboBoxItem1" /><ComboBoxItem Content="comboBoxItem2" /><ComboBoxItem Content="comboBoxItem3" /><ComboBoxItem Content="comboBoxItem4" /><ComboBoxItem Content="comboBoxItem5" /></ComboBox><ComboBox Name="comboBox4" Grid.Row="3" Grid.Column="0" Margin="20"><ComboBoxItem Content="comboBoxItem1" /><ComboBoxItem Content="comboBoxItem2" /><ComboBoxItem Content="comboBoxItem3" /><ComboBoxItem Content="comboBoxItem4" /><ComboBoxItem Content="comboBoxItem5" /></ComboBox><ComboBox Name="comboBox5" Grid.Row="4" Grid.Column="0" Margin="20"><ComboBoxItem Content="comboBoxItem1" /><ComboBoxItem Content="comboBoxItem2" /><ComboBoxItem Content="comboBoxItem3" /><ComboBoxItem Content="comboBoxItem4" /><ComboBoxItem Content="comboBoxItem5" /></ComboBox><ComboBox Name="comboBox6" Grid.Row="5" Grid.Column="0" Margin="20"><ComboBoxItem Content="comboBoxItem1"/><ComboBoxItem Content="comboBoxItem2" /><ComboBoxItem Content="comboBoxItem3" /><ComboBoxItem Content="comboBoxItem4" /><ComboBoxItem Content="comboBoxItem5" /></ComboBox><ComboBox Name="comboBox7" Grid.Row="6" Grid.Column="0" Margin="20"><ComboBoxItem Content="comboBoxItem1" /><ComboBoxItem Content="comboBoxItem2" /><ComboBoxItem Content="comboBoxItem3" /><ComboBoxItem Content="comboBoxItem4" /><ComboBoxItem Content="comboBoxItem5" /></ComboBox><ComboBox Name="comboBox8" Grid.Row="7" Grid.Column="0" Margin="20"><ComboBoxItem Content="comboBoxItem1" /><ComboBoxItem Content="comboBoxItem2" /><ComboBoxItem Content="comboBoxItem3" /><ComboBoxItem Content="comboBoxItem4" /><ComboBoxItem Content="comboBoxItem5" /></ComboBox></Grid></ScrollViewer></TabItem><TabItem Header="tabItem2" Name="tabItem2"><Grid><ListView Name="listView1" Margin="20"><ListViewItem Content="listViewItem1" /><ListViewItem Content="listViewItem2" /></ListView></Grid></TabItem></TabControl></Grid>
There is a scroll viewer around the combo boxes in the first tab. When I run a WPF application with a window that hosts this user control, I do not see any problem. When the same control is hosted in a tool window, the scroll behaviour using the mouse wheel is problematic. When I open the tool window, click the second tab, select a list view item, click the first tab again, and use the mouse wheel to scroll, I see the first combo box selection changes. I expect the whole page to scroll instead, just like it did in the WPF Application.
I tried hosting the same control in a Windows Forms Application, I don't see the problem. Also, I don't see the problem if I run the VsPackage in VS 2012.
Is there a way I can workaround this issue?
Thanks,
Priya