Accessing Resources from Dynamically Loaded XAPs

Topics: Prism v2 - Silverlight 2
Apr 27, 2009 at 11:32 PM
Hi All,

Could anyone please fill me in on the process of accessing resources (in this case an image) from downloaded XAPs using Prism.  In particular, how should the resources be included in the project, where do they go when the XAP is downloaded and then how should they be referenced?

The following is a snippet from the app to display a png file.  The image is visible in the XAML preview, but it isn't displayed in the application because it can't locate the png. (I'm 99% sure)



StackPanel x:Name="ValidUploadIcon" Width="30" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Visible">




<Image Source="Img/tick.png" Height="15"></Image>







Apr 28, 2009 at 12:47 AM
Ok, I had to change the reference to 



Image Source="../Img/tick.png" Height="15"></Image>

...reason being the XAML that contains the Image tag is a level below the root.