Path to an image located in our project:
<Image Source="/My.Asembly.Name;component/Path/to/my/image.png" ... />
Image path is in the formation of <AssembleName>;component/<Path2YourImageWithinTheAssembly>.
Useful tips:
- To get the formation of the image path, just open design mode, add an image and select its source as an image in your project/solution and see the result.
- We can omit the AssemblyName part if the code and the image are in them same assembly.
i.e. Only keep <Path2YourImageWithinTheAssembly> in the image path.
<Image Source="Path/to/my/image/without/assembly.png" ... />
Enjoy!
Advertisement