New to Telerik UI for WPFStart a free 30-day trial

How to Center the Zoom on the Selected Items

Updated on Sep 15, 2025

Environment

Product Version2019.3.1023
ProductRadDiagram for WPF

Description

How to force the zoom operation inside the selection boundaries.

Solution

Handle the PreviewZoom event of the RadDiagram and use its BringIntoView method in conjunction with its Zoom property.

C#
	private void diagram_PreviewZoom(object sender, Telerik.Windows.Controls.Diagrams.DiagramZoomEventArgs e)
    {
        e.Handled = true;
        this.diagram.BringIntoView(diagram.SelectionBounds, false);
        this.diagram.Zoom = e.TargetZoom;
    }
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support