Hi Johnathan,
Thanks for your interest in Syncfusion products.
We suggest you to use the Diagram.View’s ‘ClientRectangle’ property to achieve your requirement.
Here is the code:
[C#]
diagram1.Model.EventSink.PinPointChanged += new PinPointChangedEventHandler(EventSink_PinPointChanged);
Node node = evtArgs.NodeAffected as Node;
System.Drawing.Rectangle rg = diagram1.View.ClientRectangle;
if (rg.Height < (node.BoundingRectangle.Y + node.BoundingRectangle.Height) || rg.Width < (node.BoundingRectangle.X + node.BoundingRectangle.Width))
{
diagram1.HScroll = true;
diagram1.VScroll = true;
}
else
{
diagram1.HScroll = false;
diagram1.VScroll = false;
}
Here is the sample:
Forum AutoScroll-1907514570.zipPlease try the above sample and let us know if you have any queries.
Regards,
Amsath Ali. M