- realesmedia
- Posts: 85
- Joined:
[C++] Using absolute path
Have a component which uses image. Using ImageSource with absolute path like "C:\data\image.png" not works. Relative path works.
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: [C++] Using absolute path
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.
This kind of absolute paths are not supported yet but it is something we are fixing for the next release.
Re: [C++] Using absolute path
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):
Note that absolute URIs using "pack://application:,,," already works in 2.0.0.
Thanks!
Code: Select all
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::
NOTE
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*".
Thanks!
Who is online
Users browsing this forum: No registered users and 88 guests