Home >Backend Development >C++ >How to Properly Assign a BitmapImage from Resources.resx to Image.Source?
How to assign BitmapImage from Resources.resx to Image.Source?
Question:
A developer attempted to assign a BitmapImage from a Resources.resx file to an Image.Source, but the specified Pack URI did not work. Developers wish to use relative paths to accommodate various machine configurations.
Solution:
In order to resolve this issue and make URIs work, the following steps must be taken:
It is important to note that this Resources folder is different from the Resources.resx file. You can rename the folder as needed.
After completing these steps, the URI provided should successfully assign a BitmapImage from Resources.resx to Image.Source.
The above is the detailed content of How to Properly Assign a BitmapImage from Resources.resx to Image.Source?. For more information, please follow other related articles on the PHP Chinese website!