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
aclass library- contains
dialog.xaml- this wpf window
- contains
images/i.gif
- contains
- assembly
bwpf application- shows
dialog.xaml
- shows
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
Post a Comment