How detect diagram panel scale change!


How to detect panel scale property value change .

DiagramPanel.Scale is a dependency property, so you can data bind to it. In XAML:
…="{Binding Path=Panel.Scale, ElementName=myDiagram}"

The OrgChart sample creates such a data-binding in code.
Look at the Diagram.TemplateApplied event handler in the OrgChart constructor.

If you don’t want to use a data-binding, you can implement a DiagramPanel.ViewportBoundsChanged event handler. But that will include changes to DiagramPanel.Position as well as to DiagramPanel.Scale.