Transfer the image from one Image control to another of the same type

0

I have these three controls:

<Button x:Name="btn" />
<Image x:Name="imagem01" />
<Image x:Name="imagem02" />

Let's say I upload an image in " imagen01 " using:

OpenFileDialog ofdImage = new OpenFileDialog();
ofdImage.Filter = "JPEG Files|*.jpg|Bitmap Files|*.bmp|Gif Files|*.gif";
ofdImage.DefaultExt = "jpg";
ofdImage.FilterIndex = 1;
if (ofdImage.ShowDialog() == true)
{
    this.imagem02.Source = new BitmapImage(new Uri(ofdImage.FileName));
}

What is the code I should write, associated with the " btn " button, to load the same image I have in " imagem01 " into image02. >     

asked by anonymous 14.12.2016 / 17:02

1 answer

0

Arghh ... I can not believe it was that simple:

imagem02.Source = imagem01.Source;
    
14.12.2016 / 17:27