Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,
I have two VS2010 project in a solution. TestProject and TestProject1. I try get the resource from TestProject(external) to TestProject1(local).I have a image TestProject, and it is in the resource file called items.xaml in TestProject. Resource is loaded correctly in TestProject and it is added to mergeresources, but image in the two case, not loaded. If only if I create a Images\cross.png in TestProject1 then image is loaded correctly(but the image is not in external dll, in local dll).

Case 1 (Absolute)
XML
<Image IsHitTestVisible="False" Stretch="Fill" Source="/TestProject;component/Images/cross.png" />

Case 2 (Relative)
XML
<Image IsHitTestVisible="False" Stretch="Fill" Source="/Images/cross.png" />



Thanks in advance.
Posted

1 solution

what is the problem with absolute Uri? If your TestProject1 references TestProject, your first case should work. I use the same exact thing in my projects
 
Share this answer
 
Comments
Mahmut Koyuncu 8-Apr-13 2:48am    
Hi Irina,thanks for your response. References is fine. Problem is only loading dynamic content of uielement. I solved the problem. But make me mad :))). local resource problem is gone by cleaning solution and building again.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900