wpf 鼠标滚动轮缩放MouseWheel

2021-04-01 14:27

阅读:2587

标签:let   form   lex   nsf   max   min   transform   inverse   sla   

var pointToContent = group.Inverse.Transform(point);
var transform = group.Children[0] as ScaleTransform;
if (transform.ScaleX + delta if (transform.ScaleX + delta > max) return;
transform.ScaleX += delta;
transform.ScaleY += delta;
var transform1 = group.Children[1] as TranslateTransform;
transform1.X = -1 * ((pointToContent.X * transform.ScaleX) - point.X);
transform1.Y = -1 * ((pointToContent.Y * transform.ScaleY) - point.Y);

wpf 鼠标滚动轮缩放MouseWheel

标签:let   form   lex   nsf   max   min   transform   inverse   sla   

原文地址:https://www.cnblogs.com/pengde/p/9237938.html


评论


亲,登录后才可以留言!