Loading an image in SilverLight at run-time.
Drag an image control onto the design surface. Call it SampleImage.
if (Uri.IsWellFormedUriString(UrlTextBox.Text, UriKind.RelativeOrAbsolute))
{
BitmapImage bi = new BitmapImage();
bi.UriSource = new Uri(UrlTextBox.Text, UriKind.RelativeOrAbsolute);
SampleImage.Source = bi;
}
No comments:
Post a Comment