wpf 鼠标滚动轮缩放MouseWheel
Posted pengde
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了wpf 鼠标滚动轮缩放MouseWheel相关的知识,希望对你有一定的参考价值。
var pointToContent = group.Inverse.Transform(point);
var transform = group.Children[0] as ScaleTransform;
if (transform.ScaleX + delta < min) return;
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的主要内容,如果未能解决你的问题,请参考以下文章