0

I am new to xaml and wpf in general. I am trying to make an image appear in a user control this is the code I use:

 BitmapImage captchaSource = new BitmapImage(); captchaSource.BeginInit(); captchaSource.UriSource = new Uri(_captchaData.ImgUrl); captchaSource.EndInit(); captchaImg.Source = captchaSource; 

this is the ui code:

<Image Height="105" HorizontalAlignment="Left" Margin="12,38,0,0" Name="captchaImg" Stretch="Fill" VerticalAlignment="Top" Width="276" Grid.ColumnSpan="2" /> 

But nothing happens. No image appears. This is the url in _captchaData.ImgUrl http://www.google.ro/images/srpr/logo3w.png

Does anyone have any idea why this is?

1

1 Answer 1

2

from previous question:

"WebURL can't be provided as a source to UriSource property of BitmapImage. If it is weburl you need to download that image locally and bind that path to UriSource."

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.