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.
所以:
我写的
StreamResourceInfo sri = Application.GetResourceStream(new Uri("ProjectName;component/45.ani", UriKind.Relative));
但找不到文件:) 为什么?项目是图片
您可以检查文件上的构建操作(在属性面板上)吗?是否设置为“资源”?
你错过了“资源”吗?(也许使用 UriKind.Absolute)
new Uri("pack://application:,,,/ProjectName;component/Resources/45.ani", UriKind.Absolute)