我試圖定義來源爲我在Windows通用應用的圖像,但它GIVS我以下錯誤:C# - 通用的Windows應用程序 - 圖像源不起作用
Invalid URI: The format of the URI could not be determined.
imagePath = "Assets/Category-other-dark.png";
Uri uri = new Uri(imagePath, UriKind.Absolute);
ImageSource imgSource = new BitmapImage(uri);
imgCategory.Source = imgSource;
我通過搜索許多論壇和嘗試了很多東西,但沒有任何工作。謝謝。
我想什麼寫了文章。 –
你的png位置在哪裏?應用包或應用數據? –