当前位置: 首页 > news >正文

在什么网站做兼职安徽网站开发

在什么网站做兼职,安徽网站开发,wordpress开发手册中文版,开通公司网站WPF开发者QQ群#xff1a; 340500857 前言需要做一个用户选择头像并进行裁剪。欢迎转发、分享、点赞#xff0c;谢谢大家~。 效果预览#xff08;更多效果请下载源码体验#xff09;#xff1a;一、MainWindow.xaml代码如下#xff1a;GridBorder x:Name 340500857 前言       需要做一个用户选择头像并进行裁剪。欢迎转发、分享、点赞谢谢大家~。  效果预览更多效果请下载源码体验一、MainWindow.xaml代码如下GridBorder x:NamecontainerPanelCanvas x:NameDrawCanvasVerticalAlignmentCenter BackgroundTransparent Width{Binding ElementNamecontainerPanel,PathActualWidth}Height{Binding ElementNamecontainerPanel,PathActualHeight}Rectangle x:NamerectImage VerticalAlignmentCenter HorizontalAlignmentCenterWidth{Binding ElementNamecontainerPanel,PathActualWidth}Height{Binding ElementNamecontainerPanel,PathActualHeight}Rectangle.FillImageBrush ImageSource{Binding ImageSource,RelativeSource{ RelativeSource AncestorType{x:Type local:ImageCutCustoms}}}//Rectangle.Fill/RectangleRectangle VerticalAlignmentCenter HorizontalAlignmentCenterWidth{Binding ElementNamerectImage,PathActualWidth}Height{Binding ElementNamerectImage,PathActualHeight}Fill#99000000/Rectangle VerticalAlignmentCenter HorizontalAlignmentCenterWidth{Binding ElementNamecontainerPanel,PathActualWidth}Height{Binding ElementNamecontainerPanel,PathActualHeight}Rectangle.FillImageBrush ImageSource{Binding ImageSource,RelativeSource{ RelativeSource AncestorType{x:Type local:ImageCutCustoms}}}//Rectangle.FillRectangle.ClipRectangleGeometry x:NamerectRectangle Rect{Binding CutRect,RelativeSource{RelativeSource AncestorType{x:Type local:ImageCutCustoms}}}//Rectangle.Clip/Rectanglelocal:DragDropView x:NamedragDropItem Width{Binding ElementNamerectRectangle, Path Rect.Width}Height{Binding ElementNamerectRectangle, Path Rect.Height}Canvas.Left{Binding ElementNamerectRectangle, Path Rect.X}Canvas.Top{Binding ElementNamerectRectangle, Path Rect.Y}ParentMaxHeight{Binding ElementNameDrawCanvas,PathActualHeight}ParentMaxWidth{Binding ElementNameDrawCanvas,PathActualWidth}//Canvas/Border/Grid 二、ImageCutCustoms代码如下public partial class ImageCutCustoms : UserControl{public ImageSource ImageSource{get { return (ImageSource)GetValue(ImageSourceProperty); }set { SetValue(ImageSourceProperty, value); }}// Using a DependencyProperty as the backing store for ImageSource. This enables animation, styling, binding, etc...public static readonly DependencyProperty ImageSourceProperty DependencyProperty.Register(ImageSource, typeof(ImageSource), typeof(ImageCutCustoms), new PropertyMetadata(ImageSourcePropertyChangedCallback));public ImageSource SaveImageSource{get { return (ImageSource)GetValue(SaveImageSourceProperty); }set { SetValue(SaveImageSourceProperty, value); }}// Using a DependencyProperty as the backing store for SaveImageSource. This enables animation, styling, binding, etc...public static readonly DependencyProperty SaveImageSourceProperty DependencyProperty.Register(SaveImageSource, typeof(ImageSource), typeof(ImageCutCustoms), new PropertyMetadata());public Rect CutRect{get { return (Rect)GetValue(CutRectProperty); }set { SetValue(CutRectProperty, value); }}// Using a DependencyProperty as the backing store for CutRect. This enables animation, styling, binding, etc...public static readonly DependencyProperty CutRectProperty DependencyProperty.Register(CutRect, typeof(Rect), typeof(ImageCutCustoms), new PropertyMetadata());private Point startPoint, endPoint;public ImageCutCustoms(){InitializeComponent();this.dragDropItem.UpdateImageEvent DragDropItem_UpdateImageEvent;}private void DragDropItem_UpdateImageEvent(){var x Canvas.GetLeft(dragDropItem);var y Canvas.GetTop(dragDropItem);var w dragDropItem.Width;var h dragDropItem.Height;RenderTargetBitmap rtb new RenderTargetBitmap((int)rectImage.RenderSize.Width,(int)rectImage.RenderSize.Height, 96d, 96d, System.Windows.Media.PixelFormats.Default);rtb.Render(rectImage);var crop new CroppedBitmap(rtb, new Int32Rect((int)x, (int)y, (int)w, (int)h));SaveImageSource crop;startPoint new Point(x, y);endPoint new Point(xw, yh);CutRect new Rect(startPoint, endPoint);}private static void ImageSourcePropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e){var cutCustoms d as ImageCutCustoms;var x cutCustoms.ActualWidth / 3;var y cutCustoms.ActualHeight / 3;cutCustoms.startPoint new Point(x, y);cutCustoms.endPoint new Point(x 120, y 120);cutCustoms.CutRect  new Rect(cutCustoms.startPoint,cutCustoms.endPoint);}} 源码地址githubhttps://github.com/yanjinhuagood/WPFDevelopers.gitgiteehttps://gitee.com/yanjinhua/WPFDevelopers.gitWPF开发者QQ群 340500857 blogs https://www.cnblogs.com/yanjinhuaGithubhttps://github.com/yanjinhuagood出处https://www.cnblogs.com/yanjinhua版权本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。转载请著名作者 出处 https://github.com/yanjinhuagood
http://www.yutouwan.com/news/236542/

相关文章:

  • 信息公司网站建设方案+游戏婚礼顾问网站介绍模版
  • 网站做用户记录表怎么建设网站网页
  • 海外营销网站建设网站开发怎么收客户费
  • 网站建设 昆明深圳网站设计工资一般多少
  • 银川做网站最好的公司有哪些hr系统管理软件排名
  • 郑州专业网站制作wordpress主题 flow
  • 网站建设项目需求分析流程室内设计师工作内容
  • 成品网站1688入门网做国际物流需网站
  • 网站动态图怎么做织梦系统做的网站打开慢
  • 长沙科技公司排名泰安网站建设优化
  • 深圳企业网站建设专业培训网页设计
  • 可以做视频推广的网站吗外贸网站建站
  • 省住房和城乡建设厅官方网站wordpress新用户权限
  • 网站新增一个域名备案怎样做网站权重
  • 双公示 网站专栏建设网站seo优化步骤
  • 怎样做建网站做淘客静态购物网站模板
  • 免费开通的网站沈阳装修公司报价
  • 个人网站首页设计欣赏腾讯做的购物网站
  • 郑州建站模板搭建谷歌外贸网站建站
  • 婚纱摄影网站设计案例免费一级域名网站
  • dede手机医院网站模板赌网站怎么做
  • 30岁转行做网站编辑设计平台网站
  • 网站美工做专题尺寸多少php做商品网站
  • 微网站建设套餐太原网站建设价格低
  • 班级网站建设需求分析上海网站公
  • 建设网站申请书网站发号源码2016
  • 怎么把网站列入黑名单广州做网站建设哪家公司好
  • 浙江建设培训中心网站做seo要明白网站内
  • 水印在线制作网站网络商城需要什么资质
  • 临海响应式网站设计新手学习网站建设