2015-04-14 50 views
0

我有一个scrollviewer,我有2个WrapPanels。我想知道一旦用户滚动到最后一个面板的最后一端,我将如何获取滚动查看器位置。我试图显示并隐藏屏幕上的箭头,指示有更多的内容,但是在屏幕的右侧,但是我想在按钮到达滚动查看器的末尾时隐藏该按钮。滚动查看器平移位置触摸

有人可以指示我在后面的代码中做什么的方向,以根据平移获取scrollviewer的水平偏移位置。主要是我想得到最右边的位置,并在到达该点时隐藏箭头按钮。我的每个面板的宽度当前是1920,所以窗口当前1920宽度隐藏堆栈中的下一个面板。

我的XAML目前低于:

<ScrollViewer x:Name="scrVwrProductCategories" Style="{DynamicResource scrVwrFullWidthHorizontal}" PanningMode="HorizontalOnly" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled"> 
    <StackPanel Width="Auto" Height="750" HorizontalAlignment="Right" Orientation="Horizontal"> 
     <WrapPanel Style="{DynamicResource wrpPnlProductCategoriesPanels}" x:Name="wrpPnlProductCategories"> 
      <!-- Constant currently for count of buttons per WrapPanel = 6--> 
      <!-- This is filled in dynamically at runtime 
     <controls:btnLarge Height="325" Width="500" Margin="20,0" TitleText="My Item" NoteText="" ShowNote="Collapsed" ShowSubTitle="Collapsed"/> 
      --> 
     </WrapPanel> 
     <WrapPanel Style="{DynamicResource wrpPnlProductCategoriesPanels}" x:Name="wrpPnlProductCategories2"> 
      <!-- Constant currently for count of buttons per WrapPanel = 6--> 
      <!-- This is filled in dynamically at runtime 
     <controls:btnLarge Height="325" Width="500" Margin="20,0" TitleText="My Item" NoteText="" ShowNote="Collapsed" ShowSubTitle="Collapsed"/> 
      --> 
     </WrapPanel> 
    </StackPanel> 
    <Kiosk:SwipeForMoreArrow x:Name="ctrlSwipeForMoreArrow" HorizontalAlignment="Right" VerticalAlignment="Center" Visibility="Collapsed"/> 
</ScrollViewer> 

回答