Indeed, the relative path doesn't work in a scenario where the treeview is wrapped into a user control, but only if this user control is defined into another project, different then the one where it is used. In this case you can use the syntax mentioned in your reply. So let me try to explain what are the main components of this relative pack URI
- MyOtherProject - This is the name of the assembly where the file is stored. By default Visual Studio sets the assembly name of the project the same as the project name. So for example, if the project where the file is placed is called "WpfApplication1", the assembly name will also be "WpfApplication1". In this case, the path will be "/WpfApplication1;component/Images/File.png".
- componont - This is a keyword which specifies that the assembly that is referred ("MyOtherProject") is referenced from the local assembly.
- /Images/File.png - The rest of the URI is the path to the file.
So this specific path tells the following: Get me the "MyOtherProject
" assembly which is referenced from the local assembly, and in its root project folder there should be a folder called "Images"
which contains a file called "File.png
I hope this information helps.
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer
and share your thoughts.