• WP7的控件开发入门(二)



    首先是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一样的本地资源,网络资源通过链接直接调用,很简单 

      


  • 相关阅读:
    GNU make查找makefile的顺序
    解决ssh登录过慢的问题
    大小端转换定义结构体的技巧
    git解决git apply时遇到trailing whitespace问题
    Qualcomm Atheros AR9485 无线网卡驱动问题
    tcpdump入门笔记
    Linux内核探索之路——关于书
    Ubuntu下最好用的词典Golden Dict设置支持有道
    ubuntu14.04完美安装并设置搜狗输入法
    ubuntu网络已禁用的解决方案
  • 原文地址:https://www.cnblogs.com/zhangran/p/2422519.html
Copyright © 2020-2023  润新知