社区
Windows客户端开发
帖子详情
关于image的source赋值问题
hekerui_csdn
2014-06-02 11:56:27
为什么我这样赋值,不行呢
this.image.Source = new BitmapImage(new Uri("C:\\Data\\Users\\Public\\Pictures\\Sample Pictures\\sample_photo_00.jpg", UriKind.RelativeOrAbsolute));
...全文
1196
9
打赏
收藏
关于image的source赋值问题
为什么我这样赋值,不行呢 this.image.Source = new BitmapImage(new Uri("C:\\Data\\Users\\Public\\Pictures\\Sample Pictures\\sample_photo_00.jpg", UriKind.RelativeOrAbsolute));
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
9 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
宇峰科技
2014-09-30
打赏
举报
回复
晕。。。。。。不知道怎么和你说 new BitmapImage(new Uri("应用程序集名;componets/Sample Pictures/sample_photo_00.jpg", UriKind.RelativeOrAbsolute));
MakeUrChois
2014-06-07
打赏
举报
回复
是不显示图片?还是走到这里报错啊?
hekerui_csdn
2014-06-07
打赏
举报
回复
显示不了图片
hekerui_csdn
2014-06-05
打赏
举报
回复
不好意思啊,这几天没上。。 其实,我是想实现类似人脉那样的,在添加联系人里面,可以添加图片,作为头像。图片是从手机媒体库中读取,或者是拍照得来。 private void photoChooserTask_Completed(object sender, PhotoResult e)//这个是从手机媒体库中选择图片的函数 { if (e.TaskResult == TaskResult.OK) { BitmapImage bmp = new BitmapImage(); bmp.SetSource(e.ChosenPhoto); this.image.Source = bmp;//bmp var n = e.OriginalFileName.ToString(); //我想把读出来的图片的路径n保存到数据库中,其中一个图片对应的路径就是C:\\Data\\Users\\Public\\Pictures\\Sample Pictures\\sample_photo_00.jpg } } 最后我发现,这个路径n保存了下来,但是下一次用它来为image赋值的时候,加载不了图片。 所以现在想请教一下各位: 1.有没有知道人脉这种的怎么实现,要可以加图片的,我现在会做,不加图片,用longlistselector做的。 2.xmal中: <Image Name="f" HorizontalAlignment="Left" Height="100" Margin="199,277,0,0" Grid.Row="1" VerticalAlignment="Top" Width="100" Source='{Binding b}' />,这里绑定的b是什么类型的呢?
chen_ya_ping
2014-06-04
打赏
举报
回复
把你的图片拷贝你的项目下,然后写上相对路径。
vbfool
2014-06-03
打赏
举报
回复
你试试加上图片库的权限看看。 如果不行,那么就是不能直接使用这种uri访问系统的文件。
beyondma
2014-06-03
打赏
举报
回复
怎么可能有C:的事?
jyzdtn
2014-06-03
打赏
举报
回复
我没分了,求楼主
愤怒的猪头君
2014-06-03
打赏
举报
回复
内存卡都不让你访问,还想访问系统路径,
第1章 架构师工具箱之Docker
本章节的内容会讲到Docker的使用和应用场景、以及Docker中最核心的
Image
和Contailer。对于初学者来说,课程会介绍Docker 的安装和部署。接着更进一步的分析
Image
和Container的本质。通过编写自己的Dockerfile来构建...
Image
Source
怎么
赋值
其中
image
Brush.
Image
Source
的类型为
Image
Source
,而
Image
Source
是个抽象类, 因此我们不能直接使用它,而是使用它的子类来代替,查阅MSDN,可以看到它们的继承关系: System.Windows.Media.
Image
Source
...
WPF 中的
image
控件的
Source
如何
赋值
Image
image
=new
Image
();
image
.
Source
= new Bitmap
Image
(new Uri(@"daw\adw.jpg",UriKind.Relative));
给
Image
.
Source
赋值
wpf中不能直接给路径真的很郁闷! using System.Windows.Interop; using System.Drawing; ...wpfImg1.
Source
= Imaging.CreateBitmap
Source
FromHBitmap(((Bitmap)
Image
01).GetHbitmap(), Int...
silverlight
image
source
赋值
与转换
介绍几种常用的
Image
source
赋值
方式: this.abc.
Source
= new Bitmap
Image
(new Uri("/1.jpg", UriKind.RelativeOrAbsolute)); ...Uri uri = new Uri("1.jpg", ...
Image
Source
img
Source
= new System.Wi...
Windows客户端开发
7,655
社区成员
18,845
社区内容
发帖
与我相关
我的任务
Windows客户端开发
Windows Phone是微软发布的一款手机操作系统,它将微软旗下的Xbox LIVE游戏、Zune音乐与独特的视频体验整合至手机中。
复制链接
扫一扫
分享
社区描述
Windows Phone是微软发布的一款手机操作系统,它将微软旗下的Xbox LIVE游戏、Zune音乐与独特的视频体验整合至手机中。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章