WPF中怎么加载图片资源

new BitmapImage(new Uri("pack://application:,,,/**your assembly name**;component//Helper/Image/Image.png", UriKind.RelativeOrAbsolute));

Application.GetResourceStream(new Uri("/**your assembly name**;component/Helper/Image/Image2.png", UriKind.RelativeOrAbsolute))

https://docs.microsoft.com/en-us/dotnet/desktop/wpf/app-development/pack-uris-in-wpf?view=netframeworkdesktop-4.8

原文地址:https://www.cnblogs.com/chenyingzuo/p/15040820.html