How to change the image by Behind code

Asked

Viewed 101 times

1

I want to change the image by Behind code, but the way is wrong.

How do I find my way?

BitmapImage image = new BitmapImage(new Uri("/Images;Assets/Images/ativo.png", UriKind.Relative));
img.Source = image;

Obs:

the image ta on the way: Assets/Images/.

1 answer

1


I got!

follows the correct code:

BitmapImage image = new BitmapImage(new Uri(@"Assets\Images\inativo.png", UriKind.Relative));

Browser other questions tagged

You are not signed in. Login or sign up in order to post.