日期:2014-05-17 浏览次数:20870 次
首先建一个windows phone 7的项目

?2接下来我们讨论一下着一堆文件干什么用?
?
?
这个档案是记录了应用程序的相关属性描述,以及定义应用程序的功能性;我们不妨打开这个文件看一下都有什么?
?
<?xml version="1.0" encoding="utf-8"?>
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
<App xmlns="" ProductID="{7db581a7-1c45-48c6-94b8-fdfaaf4f5e8a}" Title="sdkSimpleMotionCS" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="sdkSimpleMotionCS author" Description="Sample description" Publisher="sdkSimpleMotionCS">
<IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
<Capabilities>
<Capability Name="ID_CAP_GAMERSERVICES"/>
<Capability Name="ID_CAP_IDENTITY_DEVICE"/>
<Capability Name="ID_CAP_IDENTITY_USER"/>
<Capability Name="ID_CAP_LOCATION"/>
<Capability Name="ID_CAP_MEDIALIB"/>
<Capability Name="ID_CAP_MICROPHONE"/>
<Capability Name="ID_CAP_NETWORKING"/>
<Capability Name="ID_CAP_PHONEDIALER"/>
<Capability Name="ID_CAP_PUSH_NOTIFICATION"/>
<Capability Name="ID_CAP_SENSORS"/>
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT"/>
<Capability Name="ID_CAP_ISV_CAMERA"/>
<Capability Name="ID_CAP_CONTACTS"/>
<Capability Name="ID_CAP_APPOINTMENTS"/>
</Capabilities>
<Tasks>
<DefaultTask Name ="_default" NavigationPage="MainPage.xaml"/>
</Tasks>
<Tokens>
<PrimaryToken TokenID="sdkSimpleMotionCSToken" TaskName="_default">
<TemplateType5>
<BackgroundImageURI IsRelative="true" IsResource="false">Background.png</BackgroundImageURI>
<Count>0</Count>
<Title>sdkSimpleMotionCS</Title>
</TemplateType5>
</PrimaryToken>
</Tokens>
</App>
</Deployment>
?
?那么,这些代码又起到什么作用呢?
?
<!--[if !supportLists]-->·???????? <!--[endif]-->ProductID:代表应用程序的 GUID 字符串
<!--[if !supportLists]-->·???????? <!--[endif]-->Title:项目的名称
<!--[if !supportLists]-->·???????? <!--[endif]-->RuntimeType:设定应用程序是 Silverlight 或是 XNA 的类型
<!--[if !supportLists]-->·???????? <!--[endif]-->Version:应用程序的版本编号