installation package files in Windows Phone 8.1 and two ways to get them

Source: Internet
Author: User

Windows Phone has three file types in addition to app file storage: Local files, roaming files, temporary files. There is also a file called an installation package

file, which refers to the internal data of the deployment file that is generated after the application is compiled. The file data under the installation package is actually the one added in the Application project

files, such as image files in the Assets folder, and so on. We can get the files under the installation package by code, but we can't get the compiled files.

(Source code or file of a capital Class).

So what data should be put into the installation package file and what data should be put in the application file? The address and access of the two files are not the same, but

Is the idea of acquiring is the same. The way to get the application file is described in front of, there are two ways, similarly, for the installation package files are also available in the way there are two

Two And when some data related to the business logic of the program should be put in the application file, for some fixed data, such as to do a location-based weather

Display the app, you'll need to place the XML file data from the province's urban area under the installation package file.


For how to get the application file, the blog address mentioned in the previous blog:

Okay, no more talking, just cut to the chase, how to get the installation package file, only get the installation package file, you can take the resources we want or

File.

1. Get through the Installedlocation property of the Windows.ApplicationModel.Package class:

Storagefolder folder = Windows.ApplicationModel.Package.InstalledLocation;

Then you can balabala the files and folders in various ways to manipulate it.

2. Get through the URI scheme:

Using ms-appx:///to get, for example, we want to get the logo.png picture under the Assets folder, then it should be written like this:

Image. Source = new BitmapImage (New Uri ("Ms-appx:///assets/logo.png"));


installation package files in Windows Phone 8.1 and two ways to get them

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.