Everything is centered and this is the way i want it to have when i open it.
When i zoom in via CTRL + Mouse Wheel Up, it zooms in and scrollbars are shown.
Problem is, when i then want to zoom out via CTRL + Mouse Wheel Down, i would have expected, that it zooms out again. - Instead it just scrolls down the vertical scrollbar and then nothing more happens.
I already tried to read the documentation and player arround with the following dependency properties: Stretch=“None” HorizontalContentAlignment=“Center” VerticalContentAlignment=“Center” HorizontalAlignment=“Center” VerticalAlignment=“Center”
No matter how i set them, i cant get it the way to behave as i wanted it to behave.
It seems, that on a certain point, when scrollbars apprea, the zooming behavior is broken.
How do i want it to behave?
When opened i want the layout to be centered with a padding of 25
Left mouse down + Mouse move should drag arround the whole diagram
Ctrl + Mouse wheel up/down should zoom in and out the diagram in relation to the mouse location
Mouse wheel up/down should scroll up/down the vertical scrollbar if there is one present
Can you assist me how i can achieve this behaviour? - Maybe it is simply bugged, or i am using it wrong,i am not sure.
The documentation also states that i should be able to zoom in/zoomout via CTRL + “+”/"-" key gesture which also does not seem to work.
I can see in the samples, that it is working. - When i moreless copy the sample, and try to work with MVVM and put the go:Diagram within a DataTemplate for a viewmodel, it does not work anymore.
Looking at the implementations of CommandHandler.CanDecreaseZoom and CanIncreaseZoom – they look identical except for how they use the CommandHnadler.ZoomFactor because the zoom factor should be different when zooming out than when zooming in.
The same goes for the implementations of CommandHandler.DecreaseZoom and IncreaseZoom. So I don’t think there’s anything wrong with the CommandHandler.
It also seems unlikely that the mouse wheel events aren’t getting to the Diagram control. But you can check whether you fiddle with either the CommandBindings or the InputBindings. Here’s how the CommandHandler sets those up:
Thank you Walter for your assistance. - I created a new application and was able to identify the problem.
The problem was raised by DevExpress UI framework i am using for dock windows.