New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Disable the Viewport Zooming in RadDiagram

DESCRIPTION

If you have a requirement to disable the buil-in zooming of the Diagram's viewport areа, you can achieve it by configuring the zooming levels of the control.

SOLUTION

You can disable the zooming either by increasing  the ZoomRate of the diagram:

<telerik:RadDiagram ID="RadDiagram1" runat="server" Width="1000" Height="700" ZoomRate="0">
    <LayoutSettings Enabled="true"></LayoutSettings>
    <ShapesCollection>
        <telerik:DiagramShape Id="s1"></telerik:DiagramShape>
        <telerik:DiagramShape Id="s2"></telerik:DiagramShape>
    </ShapesCollection>
    <ConnectionsCollection>
        <telerik:DiagramConnection>
            <FromSettings ShapeId="s1" />
            <ToSettings ShapeId="s2" />
        </telerik:DiagramConnection>
    </ConnectionsCollection>
</telerik:RadDiagram>

or passing the same value to its ZoomMin and ZoomMax properties:

<telerik:RadDiagram ID="RadDiagram1" runat="server" Width="1000" Height="700" ZoomMin="1" ZoomMax="1">
    <LayoutSettings Enabled="true"></LayoutSettings>
    <ShapesCollection>
        <telerik:DiagramShape Id="s1"></telerik:DiagramShape>
        <telerik:DiagramShape Id="s2"></telerik:DiagramShape>
    </ShapesCollection>
    <ConnectionsCollection>
        <telerik:DiagramConnection>
            <FromSettings ShapeId="s1" />
            <ToSettings ShapeId="s2" />
        </telerik:DiagramConnection>
    </ConnectionsCollection>
</telerik:RadDiagram>
In this article
Not finding the help you need? Improve this article