Invalid URI exception: The format of the URI could not be determined
1) If you give a path like in the syntax that follows, then make sure that the image is added to the solution and its build action is set to 'Content' and 'Copy Always'
myImage.Source = new BitmapImage(new Uri("/images/WITLOGOHERE.PNG", UriKind.Relative));
2) If you give a path like in the syntax that follows, then make sure that the image is added to the solution and its build action is set to 'Resource' . This means the resource is compiled into the application.
myImage.Source = new BitmapImage(new Uri("images/WITLOGOHERE.PNG", UriKind.Relative));
3) If you give a path like in the syntax that follows, then make sure that the image is in correct remote location.
myImage.Source = new BitmapImage(new Uri("Source="http://www.my.com/images/witlogo.ong", UriKind.Absolute));
Comments