Show an Image resource in a WPF window defined in a class library -


i have seen thread: wpf image resources , applied information there. situation seems bit more tricky:

  • assembly a class library
    • contains dialog.xaml
      • this wpf window
    • contains images/i.gif
  • assembly b wpf application
    • shows dialog.xaml

in dialog, have tried specifying image in following ways:

<image source="/images/i.gif"/> 

and

<image source="pack://application:,,,/images/i.gif"/> 

both work, but in designer!

next, added 2 , 2 yield:

<image source="pack://application:,,,a;;content/images/i.gif"/> 

but shows same symptoms:

as start application, images seem not found. don't know sure, since no error message. don't show up.

any ideas?

you appear missing required word "component" form beginning of path, e.g.

pack://application:,,,/yourassembly.name;component/images/plusgreen.png


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -