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