2012-09-18 69 views

回答

0

如果你換你豐富的文本框的滾動瀏覽器控制

<ScrollViewer ScrollChanged="ScrollViewer_ScrollChanged_1" Name="scvOriginal"> 
      <RichTextBox Name="rtbOrginal" ScrollViewer.CanContentScroll="True" /> 
</ScrollViewer> 

<ScrollViewer Name="scvChanged"> 
      <RichTextBox Name="rtbChanged" ScrollViewer.CanContentScroll="True" /> 
</ScrollViewer> 

然後打入的滾動改變了滾動查看器的事件

private void scvOriginal_ScrollChanged(object sender, ScrollChangedEventArgs e) 
{ 
    scvChanged.ScrollToVerticalOffset(e.VerticalOffset); 
} 

這將允許設置水平和2個富文本框的垂直滾動。