我正在尝试在silverlight中同步两个列表框的滚动条。在WPF中,我们可以使用Visual类来执行此操作,但不幸的是,这在Silverlight中不可用。我在堆栈面板中保留了两个列表框,如下所示。
<StackPanel Margin="21,128,0,-5" Orientation="Horizontal">
<ListBox Height="280" BorderThickness="0" Name="lb1" VerticalAlignment="Top" Width="287" ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden" />
<ListBox Height="274" BorderThickness="0" HorizontalContentAlignment="Stretch" Name="lb2" VerticalAlignment="Top" HorizontalAlignment="Left" Width="94" />
</StackPanel>