This is an old revision of the document!


Resources

Referencing Resources from an Assembly

In XAML, to reference an image in images/icons/icon-product-acme1.png in assembly Acme.Products.Specifications.dll, you need to use the pack notation (for package).

Local Assembly (no pack notation required):

<Image Source="/images/icons/icon-product-acme1.png" Width="35" Height="35" Margin="5" />

Referenced Assembly:

<Image Source="pack://application:,,,/Acme.Products.Specifications;component/images/icons/icon-product-acme1.png" Width="35" Height="35" Margin="5" />

NOTE: Make sure the image file is compiled as Resource (not Embedded Resource or Content) in the assembly.

References