Good day,
I want to get the zoom back to the original zoom and position after the radDiagram being zoomed.
Sometimes it is difficult to keep the zoom in good position. Thus I would like to put it again in the default zoom and point when pushing a button.
The RadDiagram making code, creating the RadDiagram:
Telerik.Windows.Diagrams.Core.DiagramConstants.MinimumZoom = 0.1
Telerik.Windows.Diagrams.Core.DiagramConstants.MaximumZoom = 10
MyRadDiagram.Zoom = 0.1
MyRadDiagram.IsSettingsPaneEnabled =
False
MyRadDiagram.DiagramElement.IsBackgroundSurfaceVisible =
False
MyRadDiagram.BackgroundGrid.Visibility =
False
MyRadDiagram.BackgroundPageGrid.Visibility = Telerik.WinControls.ElementVisibility.Hidden
MyRadDiagram.BackgroundImageLayout = ImageLayout.None
MyRadDiagram.BackgroundImage =
Nothing
posCentral = MyRadDiagram.Position
The code I use to get back to original zoom:
Private
posCenter
As
New
Telerik.Windows.Diagrams.Core.Point(0, 0)
Private
Sub
bCenterZoom_Click(sender
As
Object
, e
As
EventArgs)
Handles
bCenterZoom.Click
loading =
True
MyRadDiagram.Position = posCentral
MyRadDiagram.Zoom = 0.1
loading =
False
End
Sub