locked
Navigate to second item of the panorama view RRS feed

  • Question

  • Hi all,

    have you got any idea how to navigate to second item of panorama view insted of the first item? Thanks

    2i - image hosting zdarma
    Friday, September 2, 2011 8:54 AM

All replies

  • Hello
    The only way I can think of is setting the default panorama item like this:

    mainPanorama.DefaultItem = mainPanorama.Items[1]; 

    Friday, September 2, 2011 12:00 PM
  • Hello
    The only way I can think of is setting the default panorama item like this:

    mainPanorama.DefaultItem = mainPanorama.Items[1]; 



    Looks fine but doesn't work. Any other ideas?
    Friday, September 2, 2011 2:15 PM
  • I'm using this in my apps and it works just fine. Did you give your panorama a name? Mine is called "mainPanorama"

    So if your panorama is called Panno1 then how have to modify it to look like:

    Panno1.DefaultItem = Panno1.Items[1]; 

    Friday, September 2, 2011 2:30 PM
  • I'm using this in my apps and it works just fine. Did you give your panorama a name? Mine is called "mainPanorama"

    So if your panorama is called Panno1 then how have to modify it to look like:

    Panno1.DefaultItem = Panno1.Items[1]; 



    Yes, I am doing everything this way, but it still references to the first item. Do you know where is the problem?

    Here is my code for click button event:

            private void button1_Click(object sender, RoutedEventArgs e) 
            { 
                SecondPage sp = new SecondPage(); 
                sp.panorama1.DefaultItem = sp.panorama1.Items[1]; 
                NavigationService.Navigate(new Uri("/SecondPage.xaml", UriKind.RelativeOrAbsolute)); 
            } 
    Sunday, September 4, 2011 1:55 PM
  • I have finally solved this problem with onNavigatedTo event handler.


    Monday, September 5, 2011 12:41 PM