HWijngaarD
May 5th, 2010, 03:24 AM
My app shows an image on an absolute URL with this code:
ImageSource imgSrc = new BitmapImage(new Uri("http://designyoutrust.com/wp-content/uploads2/bla.jpg", UriKind.RelativeOrAbsolute));
Binding binding = new Binding();
binding.Source = imgSrc;
binding.Mode = BindingMode.OneWay;
DiaUserControl dia = new DiaUserControl(1); //my controls that has the image 'PhotoImage'
dia.PhotoImage.SetBinding(Image.SourceProperty, binding);
So I said, in debug it works, and I can enjoy the picture but, from the debug or release or the web or the published folder the picture won't show.
No errors though, the app doesn't throw an exception of any kind.
ImageSource imgSrc = new BitmapImage(new Uri("http://designyoutrust.com/wp-content/uploads2/bla.jpg", UriKind.RelativeOrAbsolute));
Binding binding = new Binding();
binding.Source = imgSrc;
binding.Mode = BindingMode.OneWay;
DiaUserControl dia = new DiaUserControl(1); //my controls that has the image 'PhotoImage'
dia.PhotoImage.SetBinding(Image.SourceProperty, binding);
So I said, in debug it works, and I can enjoy the picture but, from the debug or release or the web or the published folder the picture won't show.
No errors though, the app doesn't throw an exception of any kind.