0
我是Windows手機開發新手。我正在關注這篇優秀的文章(http://developer.nokia.com/Community/Wiki/Weather_in_Windows_Phone_7),並且學習了一些關於如何加載xml數據並在paronama視圖中顯示它的有用信息。但現在,而不是全景我希望它被顯示爲一個頁面。我不確定它是否在我應該使用的頁面標籤或數據網格標籤中。是否有人可以幫助我如何這段代碼轉換爲某種東西可以顯示在頁面如何將全景圖項目轉換爲頁面/數據網格
// create PanoramaItem
PanoramaItem panoramaItem = new PanoramaItem();
panoramaItem.Header = queries[query];
// modify header to show only city (not the country)
int index = queries[query].IndexOf(",");
if (index != -1)
panoramaItem.Header = queries[query].Substring(0,queries[query].IndexOf(","));
else panoramaItem.Header = queries[query];
// use ForecastTemplate in Panorama Item
panoramaItem.ContentTemplate=(DataTemplate)Application.Current.Resources["ForecastTemplate"];
panoramaItem.Content = pio; // add Panorama Item to Panorama
Panorama.Items.Add(panoramaItem); // query next city forecast
我討厭downvoters,這是不提供他們的行爲的原因。幼兒園。 –