1.

What Does Uri Schemes?

Answer»

You can use URI (Uniform Resource IDENTIFIER) schemes to refer to app files that COME from the app's PACKAGE, DATA folders, or resources.

general form of URI scheme in WinRT

<scheme>://<domain name>/<path>

some of examples:

a. App package: (ms-appx: & ms-appx-web:)

To access files from your application package, you can use either a direct or a logical file path to refer to the resource.

some of examples:

"ms-appx:///images/logo.png"

"ms-appx-web:///assets/text.html"

b. App data: (ms-appdata://)

To access files stored in the app data, use the ms-appdata: scheme. App data may be stored in a local folder, a roaming folder, or a temp folder.

some of examples:

//Local folder

<Image Source="ms-appdata:///local/images/logo.png" />

//Roaming folder

<Image Source="ms-appdata:///roaming/images/logo.png" />

//Temp folder

<Image Source="ms-appdata:///temp/images/logo.png" />

c. App Resource: (ms-resource:)

Assuming MyImage.png is content (not embedded resource) in your MyAssembly it would be LIKE this:

"ms-resource://MyAssembly/Files/Images/MyImage.png"

You can use URI (Uniform Resource Identifier) schemes to refer to app files that come from the app's package, data folders, or resources.

general form of URI scheme in WinRT

<scheme>://<domain name>/<path>

some of examples:

a. App package: (ms-appx: & ms-appx-web:)

To access files from your application package, you can use either a direct or a logical file path to refer to the resource.

some of examples:

"ms-appx:///images/logo.png"

"ms-appx-web:///assets/text.html"

b. App data: (ms-appdata://)

To access files stored in the app data, use the ms-appdata: scheme. App data may be stored in a local folder, a roaming folder, or a temp folder.

some of examples:

//Local folder

<Image Source="ms-appdata:///local/images/logo.png" />

//Roaming folder

<Image Source="ms-appdata:///roaming/images/logo.png" />

//Temp folder

<Image Source="ms-appdata:///temp/images/logo.png" />

c. App Resource: (ms-resource:)

Assuming MyImage.png is content (not embedded resource) in your MyAssembly it would be like this:

"ms-resource://MyAssembly/Files/Images/MyImage.png"



Discussion

No Comment Found