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"
注意点:图片来源路径可以是本地的也可以是网络的绝对路径,使用很简单
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一样的本地资源,网络资源通过链接直接调用,很简单