Windows phone 7 如何在wp7中获取scrollviewer/listbox的上/下滚动或左/右滚动事件

Windows phone 7 如何在wp7中获取scrollviewer/listbox的上/下滚动或左/右滚动事件,windows-phone-7,listbox,scroll,scrollview,Windows Phone 7,Listbox,Scroll,Scrollview,如何获取scrollViewer/Listbox的上/下滚动或左/右滚动事件?我有以下XAML。我想在用户滚动时收到通知 <ScrollViewer HorizontalScrollBarVisibility="Auto" Margin="0,6,-196,0" Height="Auto" Name="imageScroll"> <ListBox x:Name="myListBox" Margin="12,0,0,0"> <ListBox.

如何获取scrollViewer/Listbox的上/下滚动或左/右滚动事件?我有以下XAML。我想在用户滚动时收到通知

<ScrollViewer HorizontalScrollBarVisibility="Auto" Margin="0,6,-196,0" Height="Auto" Name="imageScroll">
    <ListBox x:Name="myListBox"  Margin="12,0,0,0">
        <ListBox.ItemsPanel>
            <ItemsPanelTemplate>
                <StackPanel Orientation ="Horizontal" >
                    <StackPanel.RenderTransform>
                        <TranslateTransform X="0" />
                    </StackPanel.RenderTransform>

                </StackPanel>
            </ItemsPanelTemplate>
        </ListBox.ItemsPanel>
        <ListBox.ItemTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal">
                    <TextBlock  Foreground="GreenYellow" FontSize="60" Text="{Binding name}"/>
                    <HyperlinkButton Content="EVTEN" NavigateUri="{Binding price}" Foreground="AliceBlue" FontSize="40" TextOptions.TextHintingMode="Animated"/> 
                    <TextBlock Foreground="Red" Padding="30" FontSize="60" Text="{Binding price}"/>
                    <TextBlock Foreground="GreenYellow"  FontSize="60" Text="{Binding description}"/>
                    <TextBlock Foreground="Red" Padding="30" FontSize="60" Text="{Binding calories}"/>
                </StackPanel>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
</ScrollViewer>

彼得·托尔(Peter Torr)的一本书展示了如何制作一个懒散的盒子。其代码显示了如何通过检测ScrollViewer下面的列表框的VisualState组中的更改来检测列表框是否正在滚动。

在列表框中,您可以向下/向上滚动

它是我的代码,希望能帮你左右滚动

<ListBox x:Name="myListBox"  Margin="12,0,0,0">
    <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
            <StackPanel Orientation ="Horizontal" >

            </StackPanel>

            <!-- You can add item contain here -->
        </ItemsPanelTemplate>
    </ListBox.ItemsPanel>

项目似乎包含了错误的位置

LazyListBox有点复杂,但它完成了我的工作。谢谢