WPF Image source relative path -
I'm trying to successfully get the relative path to working for a WPF application.
public string displayed objects {get {return "/ AppName; images / ImageName.jpg"; }}
The above code gives me the IOException: 'System.IO.IOException: Resource can not be detected' / AppName; Images / Image No Jpg 'in the output window.
The code that works:
displayed the public string {get {return Path.Combine (Path.GetDirectoryName (Assembly.GetExecutingAssembly (.) Location), "Images / ImageName.jpg"); }}
I'm wondering if / why does AppName route fail any insights? Images are not known at compile time. This is a database application and the images are stored in folders in the folder in the local directory.
Comments
Post a Comment