Category / Section
How to enable the AspectRatio of node in WPF Diagram (SfDiagram)?
1 min read
AspectRatio constraints of a node are used to enable or disable the proportional resizing of nodes in the WPF Diagram (SfDiagram). When the width of a node is resized, its height is also automatically resized to maintain its aspect ratio. Please refer to the code example below.
C#
// Here, node is the instance of Node. node.Constraints = node.Constraints | NodeConstraints.AspectRatio;