1

I am displaying the items in grid view .I want to show the grid view items in another page using flip view control.How to dynamically display the selected item position in second page ? Please tell me how to achieve this?

EDIT: In First Page : Grid View item click event i wrote code like this:

private void PhotoGrid_ItemClick(object sender, ItemClickEventArgs e)
        {
            var itemid = ((flipimage)e.ClickedItem);
            flipimage s = new flipimage() { ImageUrl = itemid.ImageUrl, Title = itemid.Title };
            this.Frame.Navigate(typeof(FlipPage), s);
        }

In Second Page:

protected override void OnNavigatedTo(NavigationEventArgs e)
        {

            flipimage s = (flipimage)e.Parameter;
           string url =  s.ImageUrl;
           flipviewcontrol.Items.Add(url);


        }

I want to display previous page selected item in second page and also click on next in flipview need to show after that selected item data.Please tell me how to write the code. For data binding to flipview :

XDocument xdoc = XDocument.Load("XMLFile1.xml");
            IEnumerable<flipimage> images = from img in xdoc.Descendants("Image") select new flipimage(img.Element("ImageTitle").Value, img.Element("ImageUrl").Value);
            flipviewcontrol.DataContext = images;

Design of Flipview:

<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <FlipView HorizontalAlignment="Left" VerticalAlignment="Top" x:Name="flipviewcontrol" ItemsSource="{Binding}">
            <FlipView.ItemTemplate>
                <DataTemplate>

                    <Image HorizontalAlignment="Left"  Source="{Binding ImageUrl}" Height="762" VerticalAlignment="Top" Width="1360" x:Name="imagecontrol"/>
                </DataTemplate>
            </FlipView.ItemTemplate>

        </FlipView>

    </Grid>

Please tell me how to show previous page selected item value and when click on next in filpview need to show after selected items data of the page vice versa!!!

user1237131
  • 1,853
  • 3
  • 26
  • 35
  • you can store the selected items indices and can show the items on these indices on other page. – loop Jul 15 '13 at 11:47
  • can you tell me if any samples are available on this? – user1237131 Jul 15 '13 at 11:50
  • [in this link][1] i have done how show the selected items when you come back again ..you can also try something like that ..hope this help you.. [1]: [enter link description here][1] [1]: http://stackoverflow.com/questions/17525318/show-previous-selection-in-gridview/17541910#17541910 – loop Jul 15 '13 at 12:09
  • hi i didn't get the solution please share if any of samples on showing the gridview items in another page using flipview control in windows8. . – user1237131 Jul 17 '13 at 09:36
  • please check my code and correct that!!! – user1237131 Jul 17 '13 at 11:22

0 Answers0