C#C
C#3y ago
AideedSS

❔ ✅ How to get ImageLocation from Controls?

lets say
PictureBox pb = new PictureBox();
pb.ImageLocation = "....";

panel1.Controls.Add(pb);


and then, I want to retrieve ImageLocation..But with panel1.Controls..
soo
var imageLocate = panel1.Controls[0].ImageLocation;


ImageLocation definition arent available..How to make code able to identify that panel1.Controls[0] is a PictureBox, so I could retrieve ImageLocation?
Was this page helpful?