Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

wpf - How to get image source from resource i created

$
0
0

i created a resource file in the resource folder of my project named Class1...

in my window i have only a image (inside a grid) i want to change its source through c# code.

what i have tried:

MyImage.Source = (ImageSource) Hotel_Reservation_Application.Resources.Class1.imageA;
[Hotel_Reservation_Application.Resources.Class1.imageA] i gets the bitmap image and not the source what should i do?



Viewing all articles
Browse latest Browse all 18858


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>