开发者

How can I zoom with mouse scroll on WPF TrackballDecorator (3dTools)?

Currently I can zoom using right click. Is there a s开发者_开发技巧imple method to do it with mouse scroll ?

Thanks.


Try something like this:

protected override void OnPreviewMouseWheel(MouseWheelEventArgs e)
            {
            base.OnPreviewMouseWheel(e);
            if(Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
            {
                yourObject.Value += (e.Delta > 0) ? 0.2 : -0.2;
            }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜