Windows Phone 7 開發環境搭建

來源:互聯網
上載者:User

WP7安裝包名稱介紹

VS升級包名稱:VS2010SP1dvd1.exe

SDK模擬器名稱:WPSDKv71_chs1.exe 或 線上安裝包名稱:vm_web2.exe

美工設計名稱:ExpressionStudio_UltimateTrial_zh-Hans.exe


Windows Phone 7 開發環境搭建介紹

本文通過step by step的模式講述如何從0開始搭建Window Phone 7開發環境,如果開發簡單的Windows Phone 7程式。只是一篇介紹性的文章,但是邁進Windows Phone 7開發之路其實就那麼簡單,一起來開發Windows Phone 7吧。

Windows 7安裝

目前Windows Phone 7開發環境只是支援Windows 7和Vista,我推薦使用Windows 7,下面講述如何搭建Windows 7的環境。

準備條件

1. Windows Xp的系統。

2. 100 GB 硬碟空間

3. 2GB的記憶體

4. 如果要開發XNA程式的話, 顯示卡支援 DirectX 10 或者更高版本,同時帶WDDM 1.1 驅動。

安裝步驟

1. 下載Windows 7 ISO

2. 下載 Windows 7 USB/DVD Download Tool

3. 安裝Windows 7 USB/DVD Download Tool。

格式化一個大於4G的USB盤。

  • 運行Windows 7 USB/DVD Download Tool。

    選擇ISO的檔案路徑。

    選擇USB Device

    選擇USB盤符。

    自動把ISO存放到該USB盤上。

    重啟機器自動進入安裝程式,點擊Next Next完成安裝。安裝程式比安裝Windows XP簡單,網路也不需要手工配置。就能正常使用。

    Windows Phone 7開發環境安裝

    1.下載 Windows Phone Developer Tools CTP - April Refresh

    下載Windows Phone Developer Tools CTP - April Refresh,這個包含了以下所有組件,一次安裝就OK了。

    Visual Studio 2010 Express for Windows Phone CTP
    Windows Phone Emulator CTP
    Silverlight for Windows Phone CTP
    XNA Game Studio 4.0 CTP

    2. 點擊安裝vm_web.exe

    點擊Install Now

    點擊Accept,這是免費軟體,enjoy it。

    大概20分鐘,安裝完成,需要重啟機器。

    編寫第一個Windows Phone 7程式

    啟動Visual Studio 2010 Express for Windows Phone

    開啟歡迎頁面,這裡有一些連結可以下載Windows Phone 7相關的文檔和視頻。

    建立一個Window Phone Application項目,叫做HelloWorldWindowsPhone。

    修改MainPage.xmal的TextBlock textBlockPageTitle 和 textBlockListTitle

    Code Snippet
    1. <Grid x:Name="TitleGrid" Grid.Row="0">
    2. <TextBlock Text="Hello world application" x:Name="textBlockPageTitle" Style="{StaticResource PhoneTextPageTitle1Style}"/>
    3. <TextBlock Text="Say Hello World" x:Name="textBlockListTitle" Style="{StaticResource PhoneTextPageTitle2Style}"/>
    4. Grid>

    增加一個按鈕

    Code Snippet
    1. <Grid x:Name="ContentGrid" Grid.Row="1">
    2. <Button Content="Say Hi" Height="70" HorizontalAlignment="Left" Margin="144,65,0,0" Name="button1" VerticalAlignment="Top" Width="160" Click="button1_Click" />
    3. Grid>

    增加按鈕處理事件

    Code Snippet
    1. private void button1_Click(object sender, RoutedEventArgs e)
    2. {
    3. textBlockListTitle.Text = "Say Hi!";
    4. }

    一個demo程式就完成了。

     

    點擊F5啟動Emulator進行調試

    進入我們編寫的程式。

    點擊按鈕

    Windows Phone 7的開發環境部署非常的簡單,開始Windows Phone 7的旅途吧,還等什麼呢? Let's go!

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.