易采站长站为您分析Silverlight文件上传下载实现方法(下载保存) ,需要的朋友可以参考下
search了非常多的文章,总算勉强实现了。有许多不完善的地方。
在HCLoad.Web项目下新建目录Pics复制一张图片到根目录下。
图片名:Bubble.jpg 右击->属性->生成操作:Resource
UC_UpDown.xaml
- <UserControl x:Class="HCLoad.UC_UpDown" xmlns="http://www.easck.com/winfx/2006/xaml/presentation"
- xmlns:x="http://www.easck.com/winfx/2006/xaml" Width="500" Height="500">
- <StackPanel Background="White" Height="450"> <Button Content="down" Click="Button_Click"></Button>
- <HyperlinkButton Content="下载保存" NavigateUri="http://www.easck.com/> <TextBlock x:Name="tbMsgString" Text="下载进度" TextAlignment="Center" Foreground="Green"></TextBlock>
- <Button x:Name="btnDownload" Content="DownLoad Pictures" Width="150" Height="35" Margin="15" Click="btnDownload_Click"/> <Border Background="Wheat" BorderThickness="5" Width="400" Height="280">
- <Image x:Name="imgDownLoad" Width="400" Height="300" Margin="15" Stretch="Fill"/> </Border>
- <Button x:Name="btnUpLoad" Content="UpLoad Pictures" Width="150" Height="35" Margin="15" Click="btnUpLoad_Click"/> </StackPanel>
- </UserControl>










