Sharing PNG/SVG resources between WPF projects
I have a set of images that need to be displayed within my WPF Views.
Assuming I only need and have a single project, adding said resources to it, setting them to
E.g.:
I'd prefer to have a system similar to how DevExpress does it via a
Any pointers you could give me on how to share image resources between projects?
Assuming I only need and have a single project, adding said resources to it, setting them to
Resource in the properties, and then referencing via their respective paths is sufficient and works.E.g.:
- Create a WPF project
- Add a folder called Resources
- Place a PNG image into the Resources folder
- Set the image item type to be
Resource - Reference the image via
pack://application:,,,/Resources/Color.pngor/MyWPFProjectName;component/Resources/Image.png
/MySharedImageProject;component/Resources/Image.png).I'd prefer to have a system similar to how DevExpress does it via a
MarkupExtension: https://docs.devexpress.com/WPF/DevExpress.Xpf.Core.DXImageExtension#remarksAny pointers you could give me on how to share image resources between projects?
Developer documentation for all DevExpress products.