Hi,
What would be the easiest way to change the default behavior of the ZoomContentControl to zoom in on scrolling of the mouse wheel? Currently, scrolling just enables the image to move up/down.
thx!
Hi,
What would be the easiest way to change the default behavior of the ZoomContentControl to zoom in on scrolling of the mouse wheel? Currently, scrolling just enables the image to move up/down.
thx!
Hello,
Right now the default input bindings (ZoomContentControl.InputBindings) get set up to do scrolling on mouse wheel. You would need to remove the MouseWheelGesture items that don't have modifiers and then add something like this:
control.InputBindings.Add(new CustomInputBinding(ZoomContentControlCommands.ZoomInToPoint,
new MouseWheelGesture(MouseWheelAction.PositiveDelta)));
control.InputBindings.Add(new CustomInputBinding(ZoomContentControlCommands.ZoomOutFromPoint,
new MouseWheelGesture(MouseWheelAction.NegativeDelta)));
Thanks! I guess i'm missing something really basic, but i can't seem to be able to make the following declaration:
ZoomContentControl.CustomInputBinding binding = new ZoomContentControl.CustomInputBinding();
I get Error 1 'ActiproSoftware.Windows.Controls.Navigation.ZoomContentControl.CustomInputBinding' is inaccessible due to its protection level
Any suggestions? thanks!!
Sorry, it appears that was an internal class. I believe you can just rename the CustomInputBinding to InputBinding and have it work.
super, works like a charm! thank you! I didn't bother clearing any of the MouseWheelGesture items that don't have modifiers (still a newbie to WPF, so figuring how things work, excuse my lack of knowledge!)...but is there any reason why i should bother doing that given that it is working anyways?
thanks!
I believe that part is a portion of core WPF, so I'm not positive but it could be that both actions are occurring if you leave the old ones in. Or it might just be taking one of the two. If it's working then you are probably ok.
thanks very much!
Please log in to a validated account to post comments.