如何在c#windows phone中加载全景项目时触发事件?

如何在c#windows phone中加载全景项目时触发事件?,c#,visual-studio-2012,windows-phone-8,C#,Visual Studio 2012,Windows Phone 8,我不熟悉c#和windows phone编程,我正在开发一个应用程序,我想在其中为每个全景项目显示包含不同消息的消息框,我知道如何触发透视项目的事件,但我一直在使用此全景项目事件 要求: 最初,全景项目应在消息框中显示“一”,当滑动到第二个全景项目时,应在消息框中显示“二”。假设您有4个全景项目: private void mainPanorama_SelectionChanged_1(object sender, SelectionChangedEventArgs e) {

我不熟悉c#和windows phone编程,我正在开发一个应用程序,我想在其中为每个全景项目显示包含不同消息的消息框,我知道如何触发透视项目的事件,但我一直在使用此全景项目事件

要求:


最初,全景项目应在消息框中显示“一”,当滑动到第二个全景项目时,应在消息框中显示“二”。

假设您有4个全景项目:

 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
            }

        }

应该和透视项目没有太大区别。您尝试了什么?私有void loginpivt(对象发送方,PivotItemEventArgs e){if(e.Item==loginpivot){ApplicationBar.IsVisible=false;}否则{ApplicationBar.IsVisible=true;}您应该使用panorama的选择更改事件mainPanorama位于什么位置(mainPanorama.SelectedIndex==1)mainPanorama_Selection功能中的Changed_1是它的名称。实际上,这是我拥有的panorama项目的名称。默认情况下,您可以使用自己的名称…您可以使用panorama项目名称来完成此操作。谢谢。您以任何方式帮助了我。mainPanorama是panorama的名称,并对此进行了投票