Absolute Beginners Series For Window Phone 8(1-3)

  学习网址:http://channel9.msdn.com/Series/Windows-Phone-8-Development-for-Absolute-Beginners/Part-1-Series-Introduction

Part1 Series Introduction

 本章是对于这一系列课程和win phone 8的一个说明.

  需要创建的两个app:SoundBoard 和 AroundMe。

  Nokia支持的win phone8开发网站:http://www.dvlup.com

  Lumia 920的一些新特性:

    Great camera---强大的照相功能,特别在弱光的情况下。

        NFC----Near Field Communications 与其他NFC手机交互数据,无视平台差异。

          Wireless charging-----无线充电。

     Voice commands------语音命令。  

Part2  Installing Windows Phone SDK 8.0

  在win8 64-bit 上安装Windows Phone 8 SDK因为 Windows Phone Emulator,他运行在虚拟机Hyper-V上。可以让你在电脑上运行win phone 8,就行在手机上一

样。 

  下载sdk:http://developer.windowsphone.com/en-us/downloadsdk

  安装完出现以下提示,通过http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj863509(v=vs.105).aspx解决。

    

Part3  Writing your First Windows Phone 8 App

  课程资源下载:https://absolutebeginner.codeplex.com/releases/view/108480

   创建一个名为“PetSounds”的 Windows Phone App 项目。

    

 

    

   添加代码行数显示:

    

    

  

  在Name为ContentPanel的Grid下添加一个Button和一个MediaElement  

      <Button Name="PlayAudioButton"
                    Height="200"
                    Width="200"                    
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    Background="Red">Quack</Button>
            
            <MediaElement x:Name="QuackMediaElement" Source=""/>

  到课程资源下载网站https://absolutebeginner.codeplex.com/releases/view/108480下载Assets,将Assets/PetSounds_Assets/Audio托到项目的Assets下。修改

MediaElement。Source是文件地址,Volume是声音大小(0-1),AutoPlay是是否自动播放。  

<MediaElement x:Name="QuackMediaElement" 
              Source="/Assets/Audio/Animals/Duck.wav"  
              Volume="1"
              AutoPlay="False"/>

  添加Button点击事件。Click="PlayAudioButton_Click"  

    private void PlayAudioButton_Click(object sender, RoutedEventArgs e)
        {
            QuackMediaElement.Play();
        }

 

  

  

posted @ 2013-10-15 16:51  小飞的DD  阅读(252)  评论(0编辑  收藏  举报