今天无聊,在网上瞎逛,突然看到一些关于silverlight的内容。嘿嘿,正好趁自己有空也写个小程序玩玩。
用了,最后干脆就改成了Beta2了,毕竟是最新版,果然用着舒服些啊。 整个功能完成
的比较顺利,当中也遇到了几个稍微麻烦点
"jay.jpg"路径怎么转?在Api里翻了半天,也没发现。最后到网上查了下,
网上搜了半天没个结果,最后瞎折腾了半
天用获取网络资源的方式,竟然成功了。方式:
里去了。
下面是Silverlight项目xaml部分源码了。
<UserControl x:Class="SilverlightTravel.NetWebClient"
xmlns:x="
http://schemas.microsoft.com/winfx/2006/xaml
"
Width="600" Height="300" Loaded="UserControl_Loaded">
<Grid x:Name="LayoutRoot" Background="WhiteSmoke" ShowGridLines="True">
<Grid.RowDeFinitions>
</Grid.RowDeFinitions>
<Grid.ColumnDeFinitions>
</Grid.ColumnDeFinitions>
<TextBlock Text="请选择人物查看介绍" Grid.Column="0" Grid.Row="0"></TextBlock>
<ListBox Grid.Column="0" x:Name="lstMusicer" Grid.Row="1" Width="200" HorizontalAlignment="Left" SelectionChanged="lstMusicer_SelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding UserName}" Height="35"></TextBlock>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Image x:Name="imgPerson" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="1"></Image>
<MediaElement x:Name="mePlayer" HorizontalAlignment="Left" Source="video/" Grid.Row="2" Grid.Column="2" Height="50" Width="50"></MediaElement>
<TextBlock x:Name="txtIntroduce" Grid.Row="2" Grid.Column="1" Margin="30 50 " Grid.ColumnSpan="2"></TextBlock>
<Button Height="50" VerticalAlignment="Top" Margin="10 " Width="120" Grid.Row="2" Grid.Column="0" Background="Red" Content="数据异步通信"></Button>
</Grid>
</UserControl>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。