Get relative path to image in another project in same solution
I have a Silverlight project with several projects in my solution. I want to get a relative path to an image in project A from project B inside my helper C# class.
solu开发者_如何转开发tion
-Project A
-Helper.cs
-Project B
-image.jpg
Helper.cs need a reference to image.jpg
I can't add a reference to prj A from prj B.
Can I do something like:
Uri uri = new Uri("/project.name.projectA;image.jpg", UriKind.Relative);
Thank you
pack://application:,,,/ReferencedAssembly;component/ResourceFile.xaml
Replace ReferencedAssembly with the name of the referenced assembly and ResourceFile.xaml with the name of the file in it which has build type resource.
Resource File Pack URIs Referenced Assembly
精彩评论