双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

看到一段代码,不知道什么意思,求解释一下

u010982187 u010982187 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
private void canvas_Drop(object sender ,DragEventArgs e)
{isImagerDrag=false;
ImageAndTextDecorator sourceImage=e.Data.getData(typeof(ImageAndTextDecorator)) as ImageAndTextDecorator;
if(sourceImage==null)
{return;}
Point newLocation;
if(calculateLovation(e,out newLocation)==false)
return;
if(!(e.OriginalSource is Border))
return;
MyIage newImage = new MyIage
newimage.source = sourceImage.ImageSource;
newimage.width =newimage.height=39+39+39+1+1;
newimage.setvalue(Canvas.LeftProperty, newLocation.Y-40);
canvas.Children.add(newimage);
if(border !=null)
{border.setvalue(Camvas.TopProperty,3.0)





MyImage是一个自定义控件
...全文

相关推荐

评论 1
收藏 已收藏
分享
返回顶部
u010982187
C# 111,129 成员 642,540 内容