You can also add an image as a resource, i.e. add an existing item and change the Build Action property for the resource
then link to it that way
BitmapImage bitImg = new BitmapImage(); bitImg.BeginInit(); bitImg.UriSource = new Uri("./Resource/Images/Bar1.png", UriKind.Relative); bitImg.EndInit(); ((Image)sender).Source = bitImg;
Thus, you do not need to include an image with the program, it is included in the package as a resource
PrimeTSS
source share