我有像这样的TabControl
<TabControl HorizontalAlignment="Stretch"
Name="tabControl1"
IsSynchronizedWithCurrentItem="True"
VerticalAlignment="Stretch"
Grid.Column="0"
ItemsSource="{Binding Workspaces}"
ItemTemplate="{StaticResource ClosableTabItemTemplate}"
SelectedItem="{Binding CurrentWorkspace, Mode=TwoWay}">
</TabControl>
Woorkespaces是ViewModels的ObservableCollection
tabItem的DataTemplate是
<DataTemplate DataType="{x:Type vm:TextViewerViewModel}">
<ctls:TextViewerComponent/>
</DataTemplate>
TextViewerComponent包含
<!--<ScrollViewer Name="scv" CanContentScroll="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Grid.Row="1" >-->
<TextBox Name="logContent" IsReadOnly="True" TextWrapping="Wrap" Text="{Binding PageText}" VerticalScrollBarVisibility="Auto" Grid.Row="1" />
<!--</ScrollViewer>-->
现在问题是当我更改标签滚动条更新位置以滚动上一个标签的位置时。如何解决这个问题?