点击button选择照片,怎样让Image显示照片啊?
wpf吧
全部回复
仅看楼主
level 1
mshashan
楼主
新手求大侠帮忙啊
2012年09月24日 07点09分
1
level 3
herohua850731
首先给如果Image在前台就先给起个名字 比如 Name = "img"
然后再Button 的Click事件里使用 OpenFileDialog 选择文件的控件
获得 OpenFileDialog 的 FullName
这个FullName比如就是图片的地址
然后 img.Source = new BitmapImage(new Uri(FullName,UriKind.....));
就OK了
2012年09月28日 08点09分
2
1