摘要: 上载图片的两种方法:UI代码:很简单一个Image控件显示加载的图片,一个Button用于文件流方式添加图片<Window x:Class="拖放添加图片.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Widt 阅读全文
posted @ 2012-10-29 21:01 江伟 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 前几日在公司做sl上传头像,因为代码不能拿出来,所以自己大体写了下。功能上算是实现了。效果图: 点击Browse按钮打开一张图片,点击Clip会出来一个红色的方框。可以用鼠标拖动红框,在右边角有一个三角,可以改变大小。还有四周灰色的蒙版,用了四个Rectangle,如下图 四个Rectangle的放置,当然不一定按照我的做法,只要能实现功能即可。 xaml代码:<controls:ChildWindow x:Class="SlTest.ClipImg" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/p 阅读全文
posted @ 2012-10-29 13:23 江伟 阅读(139) 评论(0) 推荐(0) 编辑