【问题标题】:how to load panorama item when it is opnened打开时如何加载全景项目
【发布时间】:2014-07-16 06:57:12
【问题描述】:

在我的 wp8 应用程序中,我为所有全景项目创建加载事件,但是当我运行应用程序时,所有全景项目都会立即加载,但我希望在我轻弹全景项目时加载它们

private void podne_Loaded(object sender, RoutedEventArgs e)
{
    tesbihat2.Content = TextToXaml("podne.txt");
}

private void ikindi_Loaded(object sender, RoutedEventArgs e)
{
    tesbihat3.Content = TextToXaml("ikindi.txt");
}

private void aksam_Loaded(object sender, RoutedEventArgs e)
{
    tesbihat4.Content = TextToXaml("aksam.txt");
}

private void jacija_Loaded(object sender, RoutedEventArgs e)
{
    tesbihat5.Content = TextToXaml("jacija.txt");
}

【问题讨论】:

    标签: c# windows-phone-8 panorama-control


    【解决方案1】:

    试试这个:

    private void Panorama_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        switch (((Panorama)sender).SelectedIndex)
        {
            case 0: // defines the first PanoramaItem Loaded
                MessageBox.Show("First Item is on ForeGround");
                break;
            case 1: // second one
                MessageBox.Show("Second Item is on ForeGround");
                break;
    
            case 2: // third one
                MessageBox.Show("Third Item is on ForeGround");
                break;
        }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-11
      • 2011-11-09
      相关资源
      最近更新 更多