Articles in this section
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;

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied