Question

Im trying to achive this on a windows phone 8 project: Rought sketch

I want to have a number of rows filled with elements (images in this case) that i can scroll in the horizontal, having the ability to click on them and navigate to a new page, besides that, i want that list to be scrollable on the vertical

For example, i would scroll down til i saw Row 10, then on Row 10 i wouls scroll to the right until i get to the image 8, and when i pressed it i would navigate to another page.

if anyone could give me a clue on how to make this happen i would appreciate

Was it helpful?

Solution

Maybe this will help you. Put a Scrollviewer inside a ListBox Datatemplate with Horizontal scrollBarVisibility.

    <ListBox  Grid.Row="1"  Name="listBoxClient">
       <ListBox.ItemTemplate>
         <DataTemplate>
            <ScrollViewer VerticalAlignment="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" Width ="400">
<StackPanel Orientation="Horizontal">
            <Image Source="{Binding YourImageSource}" Width="YourWidth" Height="YourHeight" Tap="Iamge_Tap"/>
</StackPanel>
            </ScrollViewer>
          </DataTemplate>
         </ListBox.ItemTemplate>
    </ListBox>

In code behind

private void Iamge_Tap(object sender, System.Windows.Input.GestureEventArgs e)
    {
      NavigationService.Navigate(new Uri("Your page path",UriKind.Relative));
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top