WP7的控制項開發入門(二)

來源:互聯網
上載者:User

首先是PasswordBox

<PasswordBox Height="86" 

                         HorizontalAlignment="Left"                          Margin="78,104,0,0"                          Name="passwordBox1"                          VerticalAlignment="Top"                          Width="324"                          PasswordChar="*"/>

TextBox 

  <TextBox Width="400"                     Height="300"                     Background="Azure"                     Foreground="Yellow"                     >                <TextBox.InputScope>                    <InputScope>                        <InputScopeName NameValue="Number"/>                    </InputScope>                </TextBox.InputScope>

</TextBox> 

 Image控制項

<Image Width="300"

                   Height="200"                   Margin="88,24,92,383"                   Source="Images/image1.jpg"/><Image Height="200"                    Margin="88,336,92,71"                    Width="300" 

                   Source="http://www.wpdang.com/wp-content/uploads/2012/03/Lumia-800-press.jpg"/> 

 注意點:圖片來源路徑可以是本地的也可以是網路的絕對路徑,使用很簡單

MediaElement控制項

 支援的流媒體格式:mms: rtspt:rtsp:

屬性:

IsMuted:是否靜音

Strench:畫面填充

AutoPlay:是否是預設播放狀態

事件:

MediaOpened

MediaEnded

MediaFailed

支援的 Windows Phone 媒體轉碼器

http://msdn.microsoft.com/zh-CN/library/ff462087(vs.92).aspx

 <MediaElement Height="250"                          HorizontalAlignment="Left"                          Margin="52,25,0,0"                           Name="mediaElement1"                           VerticalAlignment="Top"                          Width="340"                           Source="Images/The Story Of Us.mp4"/>            <MediaElement Height="251"                           HorizontalAlignment="Left"                           Margin="52,332,0,0"                           Name="mediaElement2"                           VerticalAlignment="Top"                           Width="390" 

                          Source="http://ecn.channel9.msdn.com/o9/ch9/7238/567238/Ping70_ch9.mp4"/> 

跟Image一樣的本地資源,網路資源通過連結直接調用,很簡單 

  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.