Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个像 URI 格式异常这样的异常,为什么它会发生,尽管它是正确的
ImageBrush img1 = new ImageBrush(); img1.ImageSource = new BitmapImage(new Uri("/Assets/new.jpg"));
该 URI 不适用于 Windows 应用商店应用程序 (RT/Metro)。
尝试这个:
new Uri("ms-appx:///assets/new.jpg");