Use Windows 8 to develop Metro-style applications II

Source: Internet
Author: User

Starting from this chapter, I will create my podcast RSS browser step by step.

1. Open Visual Studio 2012.
2. Select "file"> "new project ". The Create Project dialog box is displayed.
3. In the installed pane, expand Visual C # Or Visual Basic ".
4. Select the "Windows Metro style" template type.
5. In the center pane, select "Blank app (XAML )".
6. Enter the project name windowsblogreader.

7. Let's take a look at the files created by vs2012 for the blank application template.
Properties/assemblyinfo (. VB or. CS) contains the name and version metadata embedded in the generated collection.
Package. appxmanifest contains the metadata that describes your application, including the display name, description, logo, and features.
Assets/* You can replace the default logo and initial screen image.
Common/standardstyles. XAML contains the default style and template of the application.
App. XAML, app. XAML. * (. VB,. CS) files specify application-level logic. The application class is required to display the user interface.
Mainpage. XAML is used to create the default start page of the user interface.
Mainpage. XAML. * (. VB,. CS) contains a logical code hidden file of the default start page.
8. Specify application functions
A) Metro-style applications run in secure containers and have limited access permissions to file systems, network resources, and hardware.
Whenever a user installs an application from the Windows App Store, Windows displays the Metadata Package. appxmanifest in the file.
To determine which functions the application needs to perform. For example, an application may need to access data in the Internet and documents in the user document library,
Or the user's camera and microphone. After the application is installed, it displays the required functions to the user,
The user must grant corresponding permissions to access these resources.
If the application does not have the permission to request and receive the access to a required resource, the system will prohibit the user from accessing the resource when running it.
B) some common functions are listed below:
Document Library Access allows applications to access the user's document library and add, modify, or delete files.
Your application can only access the file type declared in the list, and cannot access the document library on the home group computer.
Enterprise Authentication allows an application to connect to an Intranet resource that requires domain creden.
Internet (client and server) allows your applications to access the Internet and public networks, and allows you to connect to your applications over the Internet.
Inbound Access to important ports is always blocked.
This is a superset of the Internet (client) function. You do not need to declare both.
Internet (client) allows your applications to access the Internet and public networks. Most applications requiring Internet access should use this function.
Location allows your application to access the user's current location.
The microphone allows your application to access the user's microphone.
The music library allows your apps to access your music library and allows you to add, change, or delete files.
You can also access the music libraries on the home group computers and the types of music files on the locally connected Media Servers.
The image library allows your app to access your image library and allow you to add, modify, or delete files.
You can also access the image library on the home group computer and the image file type on the locally connected Media Server.
Nearby applications allow access to users' close-to-Field Communication (NFC) devices.
Removable storage allows your applications to access removable storage devices, such as external hard drives or USB flash drives, and allows you to add, change, or delete files.
Your application can only access the file types declared in the list. Your applications cannot access removable storage devices on home group computers.
Shared User Certificates allow your applications to access software and hardware certificates, such as smart card certificates.
Text message passing allows your application to access the text message passing function.
The video library allows your applications to access your video library and allows you to add, modify, or delete files.
You can also access the video library on the home group computer and the video file type on the locally connected Media Server.
Webcam allows your app to access your camera.
C) add features to the application
C-1. In Solution Explorer, double-click package. appxmanifest. The file is opened in the Application List designer.
C-2. In Application List designer, select the features tab.
C-3. Select the checkbox next to each feature required for your application. ("Internet (client)" is selected by default .)
C-4. Save and close the file.


D) when a function is specified, the function is listed in the package. appxmanifest. xml file under the capabilities element.
As we can see just now, you usually set the function in the Application List designer, but if you right-click the file,
Select "open mode ...", Open the file in the XML editor, and you can see the capabilities element in the XML.
For example:
<Capabilities>
<Capability name = "internetclient"/>
</Capabilities>

To be continued, please wait ....

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.