wpf - Some picture cannot display on image -


i have unclear, got 1 image display image based url. there image goes exception. below code:

if file.exists(myequip)       image1 = new bitmapimage()       image1.begininit()       image1.urisource = new uri(myequip, urikind.relative)       image1.cacheoption = bitmapcacheoption.onload       image1.endinit()       imgequip.source = image1       imgequip.stretch = stretch.fill end if 

all pictures in jpg. exception jumps @ endinit. when open image using windows photo viewer, have pictures. not corrupted. idea why happen?

try change urikind absolute , please check uristring (myequip)

  image1 = new bitmapimage()   image1.begininit()   image1.urisource = new uri(myequip, urikind.absolute)   image1.cacheoption = bitmapcacheoption.onload   image1.endinit()   imgequip.source = image1   imgequip.stretch = stretch.fill 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -