Windows Phone新手开发教程(一)

栏目: 前端 · 发布时间: 7年前

内容简介:Windows Phone新手开发教程(一)

这是本系列的第1部分。在进行开发的过程之前,我将解释Windows Phone的基础知识。第1部分涵盖了以下三个开发的基本主题:

  • Windows Phone SDK的安装
  • Windows Phone用户界面(UI)
  • 基本控件的认识

1. Windows Phone SDK的安装

首先从该 链接 下载并安装用于Windows Phone 7系列的全部开发工具。在安装完先前的SDK 7.1之后,访问该 链接 对版本进行升级。

Windows Phone SDK包含以下内容:

  • Microsoft Visual Studio 2010 Express for Windows Phonee
  • Windows Phone Emulator
  • Windows Phone SDK 7.1 Assemblies
  • Silverlight 4 SDK
  • Windows Phone SDK 7.1 Extensions for XNA Game Studio 4.0
  • Microsoft Expression Blend SDK for Windows Phone 7
  • Microsoft Expression Blend SDK for Windows Phone OS 7.1
  • WCF Data Services Client for Window Phone
  • Microsoft Advertising SDK for Windows Phone

2. Windows Phone用户界面(UI)

首先从File菜单选择New project,然后选择Window Phone Application并输入应用程序名称,选择存储位置。

来看Windows Phone默认的UI面板元素Grid和Stack Panel。

Windows Phone新手开发教程(一)

  1. StackPanel
    Stack Panel包含了应用程序和页面的名称。
    <stackpanel x:name= "TitlePanel" grid.row= "0" <textblock= "" text= "MY APPLICATION" style= "{StaticResource  PhoneTextNormalStyle}"
       <textblock x:name= "PageTitle" text= "page name Style=" {staticresource= "" phonetexttitle1style} "=" "> 
    </textblock></stackpanel>
  2. Grid
    Grid面板包含了所有其它控件,如stackpanel、TextBox、TextBlock、Button、HyperLinkButton、Image等等。
    <grid x:name= "ContentPanel" grid.row= "1" margin= "12,0,12,0"
       <button x:name= "Button" content= "Button" height= "95" ></button> 
       <textblock x:name= "TextBlock" text= "This is TextBlock" height= "95" ></textblock> 
       <img x:name= "Image" height= "100" margin= "6,378,-6,129" source= "/PhoneApp1;component/Images/Chrysanthemum.jpg"
    </grid>

3. 基本控件的认识

Windows Phone 7提供了包含Button、TextBox、TextBlock、Image和HyperLink在内的各种控件。

  1. Button: Button控件负责触发器的响应。
    <button x:name= "Button" content= "Button" height= "95" ></button>
  2. TextBlock: TextBlock控件显示文本格式下的文本块。
    <textblock x:name= "TextBlock" text= "This is TextBlock" height= "95" ></textblock>
  3. TextBox :TextBox控件用于管理文本框中所输入文本。
    <textbox x:name= "MyTextBox" text= "Hai" height= "95" margin= "0,98,0,0" verticalalignment= "Top" ></textbox>
  4. Image :Image控件可以对显示的图像进行图像控制。
    <img x:name= "Image" height= "100" margin= "12,320,-12,187" source= "/PhoneApp1;component/Images/Chrysanthemum.jpg" >
  5. HyperLinkButton :HyperLinkButton控件用于页面切换的导航。
    <hyperlinkbutton content= "HyperlinkButton" height= "44" horizontalalignment= "Left" margin= "12,450,0,0" name= "hyperlinkButton1" verticalalignment= "Top" width= "258" ></hyperlinkbutton>

Windows Phone新手开发教程(一)

to be continue...

本文翻译自c-sharpcorner.com,原文地址


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Agile Web Development with Rails, Third Edition

Agile Web Development with Rails, Third Edition

Sam Ruby、Dave Thomas、David Heinemeier Hansson / Pragmatic Bookshelf / 2009-03-17 / USD 43.95

Rails just keeps on changing. Rails 2, released in 2008, brings hundreds of improvements, including new support for RESTful applications, new generator options, and so on. And, as importantly, we’ve a......一起来看看 《Agile Web Development with Rails, Third Edition》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

在线进制转换器
在线进制转换器

各进制数互转换器

SHA 加密
SHA 加密

SHA 加密工具