URIs in NoesisGUI
In noesisGUI, uniform resource identifiers (URIs) are used to identify and load files like Images, Fonts and Dictionaries. Two kind of URIs are supported: absolute and relative.
Relative URIs
By default, a relative pack URI is considered relative to the location of the XAML that contains the reference. For example:
<Image Source="Images/icon.png" />
In this example, the image icon.png must be located in the directory Images that must exist in the same place than the XAML itself. For example, consider the following project structure:
/ App
+ Sample.csproj
/ XAML
+ test.xaml
/ Images
+ icon.png
Absolute URIs
Absolute URIs are considered relative to the root of the project (.csproj) indicated. For example:
<Image Source="pack://application:,,,/Sample;component/Images/icon.png" />
Or using a simplified syntax:
<Image Source="/Sample;component/Images/icon.png" />
In this case, the Images folder must be located next to the project file, Sample.csproj in this case. For example, consider the following project structure:
/ App
+ Sample.csproj
/ Images
+ icon.png
/ XAML
+ test.xaml
NOTE
The content of the .csproj file is ignored. It could be even an empty file. We only need to locate it in the same folder than the XAML or in a parent one.