c# - Image Source in WPF -



c# - Image Source in WPF -

i'm trying set image source in xaml maintain getting "could not find part of path..." (plus directory want call). think i'm messing location i'm supposed calling. hierarchy looks like:

-solution -project -data -images -image_i_want_to_use.png (placeholder name) -themes -demo -default -fileimworkingin.xaml -other files -other folders -another project -third project

how configure image source in xaml file i'm working in can utilize image(s)?

i tried

<image source="/project;component/images/image_to_use.png">

(where each name placeholder) had no luck. pointers? apologies if trivial.

thanks!

in .net 4, image.source value work:

<image source="/assemblyname;component/foldername/image_to_use.png">

however, microsoft made horrible changes in .net 4.5 broke many different things , in .net 4.5, you'd need utilize total pack path this:

<image source="pack://application:,,,/assemblyname;component/images/image_to_use.png">

c# wpf xaml

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -