user2992174
user2992174

Reputation:

How to trigger event when the panorama item is loaded in c# windows phone?

I am new to c# and windows phone programming, I am developing a app in which I want to show message box with different messages for each panorama item, I know how to trigger event for pivot item but I am stuck with this panorama item events.

Requirement:

Initially panorama item should display "one" in message box and while swiping to second panorama item it should display "two" in message box.

Upvotes: 1

Views: 152

Answers (1)

Pradeep Kesharwani
Pradeep Kesharwani

Reputation: 1478

Suppose you are having 4 panorama items:

 private void mainPanorama_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
        {
            if (mainPanorama.SelectedIndex == 0)
            {
               //Put your message
            }
            else if (mainPanorama.SelectedIndex == 1)
            {
                //Put your message
            }
            else if (mainPanorama.SelectedIndex == 2)
            {
                //Put your message
            }
            else if (mainPanorama.SelectedIndex == 3)
            {
                //Put your message
            }

        }

Upvotes: 2

Related Questions