Topic Author
Posts: 85
Joined: 18 May 2016, 10:26

[C++] Using absolute path

19 Apr 2017, 15:48

Have a component which uses image. Using ImageSource with absolute path like "C:\data\image.png" not works. Relative path works.
User avatar
Site Admin
Posts: 2097
Joined: 22 Dec 2011, 19:20

Re: [C++] Using absolute path

20 Apr 2017, 18:30

Could you please create a ticket in our bugtracker.
This kind of absolute paths are not supported yet but it is something we are fixing for the next release.
User avatar
Site Admin
Posts: 3052
Joined: 20 Jan 2012, 17:18

Re: [C++] Using absolute path

21 Apr 2017, 01:28

Please, do not create the ticket because we already added support for this. This is the documentation about absolute paths in 2.0.1 (to be released today or tomorrow):
Absolute URIs

For Absolute URIs the specified location is sent without modifications to the `Resource Provider <Gui.Core.ProvidersTutorial.html>`_.

Absolute URIs start with '/' and might be preceded by *pack://application:,,,* and/or a reference to a WPF project like */Sample;component*:

.. admonition:: 

   The name of the project, Sample.csproj in this case, is ignored by Noesis.

.. code-block:: xml

    <Image Source="pack://application:,,,/Images/icon.png" />

.. code-block:: xml

    <Image Source="pack://application:,,,/Sample;component/Images/icon.png" />

.. code-block:: xml

    <Image Source="/Sample;component/Images/icon.png" />

.. code-block:: xml

    <Image Source="/Images/icon.png" />

In all these cases, resource providers will receive the path "*Images/icon.png*"" when being asked to load the asset.

Paths beginning with a drive letter are also considered absolute:

.. code-block:: xml

    <Image Source="C:/Images/icon.png" />

In this case the entire path is passed to the resource provider "*C:/Images/icon.png*".
Note that absolute URIs using "pack://application:,,," already works in 2.0.0.


Who is online

Users browsing this forum: No registered users and 1 guest