I am doing apfication WPF with C #. I have three kinds of images in my Data folder. I have an Iamge abd text block and one button. when I click the button, it displays the text in the text block and depends on the text, the image may change. How can I add an image at runtime.
public void Adddata(string lData)
{
Text1.Text = lData;
Img1.Source = "data\vista_flag.png";
}
I know that it is incorrectly encoded. But I do not know what I can do for this. Img1.Source = ????????
source
share