我按照這篇文章(http://mikaelkoskinen.net/winrt-step-by-step-tutorial-mvvm-gridview-semanticzoom/)逐步添加圖像到我的項目的GridView,但是當我完成添加GridView到我的項目後面這篇文章。我在展示圖片時遇到了問題,圖片(在項目文件夾中)在應用程序運行時不顯示,但應用程序顯示來自Internet的圖像(文章中的代碼運行良好並從項目文件夾加載圖像),我不知道如何表達這個問題,在GridView上顯示圖像贏8地鐵風格?
這是一些代碼:
public class Movie
{
public string Title { get; set; }
public string Subtitle { get; set; }
public string Image { get; set; }
public string Category { get; set; }
}
public class MovieCategory
{
public string Title { get; set; }
public List<Movie> Items { get; set; }
}
我的代碼從項目文件夾中加載圖像:
MovieList.Add(new Movie { Title = "The Ewok Adventure", Category = "Adventure", Subtitle = "The Towani family civilian shuttlecraft crashes on the forest moon of Endor.", Image = "duy.jpg" });
(我以前創建MovieList和圖像「duy.jpg」是該項目的文件夾中)我爲什麼我不試試上面的代碼源從文章
,我通過調試工具仔細檢查圖像源字符串,它運行良好(來自項目文件夾的圖像顯示在文章的源文件中),但是當我添加到我的項目時,來自Internet鏈接的圖像運行良好,但來自項目文件夾的圖像未加載。 請幫助我,感謝您的提前。
謝謝,我已經展示了這個問題 – 2013-04-10 16:53:35