Im doing apllication WPF with C#. I have three kinds of images in my folder "Data". I have Iamge abd textblock and one button. when i press button,it will display text in textblock and depends on the text,image may vary.How can i do add image at runtime.
public void Adddata(string lData)
{
Text1.Text = lData;
Img1.Source = "data\vista_flag.png";
}
I know i coded wrongly.but I dont know what can i do for that. Img1.Source = ????????