Hi All
I have an issue that i think is related to the AutoScroll or ViewPortBounds properties.
Whenever I move a node AFTER zooming in or scolling, the diagram jumps to a new position which is quite irritating.
I have tried a number of things after reading a few posts.
A few things i have tried are:
- stopping auto scroll (Me.myDiagram.Panel.StopAutoScroll())
-handling template applied and setting autoscroll region to thickness of zero (Me.myDiagram.Panel.AutoScrollRegion = New Thickness(0))
-changing the zoom time which only makes it jump quicker (Me.myDiagram.Panel.ZoomTime = 0)
-setting a custom template for the diagram (Template="{StaticResource CustomAutoScroller}") then overriding ComputeAutoScrollPosition :
Protected Overrides Function ComputeAutoScrollPosition(viewPnt As System.Windows.Point) As System.Windows.Point
Dim bounds = Me.DiagramBounds
Dim view = Me.ViewportBounds
Dim pos = MyBase.ComputeAutoScrollPosition(viewPnt)
pos.X = Math.Max(Math.Min(pos.X, bounds.Right - view.Width), bounds.X)
pos.Y = Math.Max(Math.Min(pos.Y, bounds.Bottom - view.Height), bounds.Y)
Return pos
End Function
Please may someone help me.
Thanks in advance.