Having trouble getting help?
Contact Support
Contact Support
Auto-Scroll Limit in Xamarin Diagram (SfDiagram)
21 Jan 20251 minute to read
The auto-scroll limit allows you to define the scrollable region of the Diagram while the page is getting auto-scrolled. The AutoScrollLimit
property of scroll settings class helps to limit the auto scrolling area. It includes the following options:
- Infinity: Allows auto-scroll in all directions without any restriction.
- Diagram: Allows auto-scroll within the Diagram content.
- Limited: Allows auto-scroll within the specified area.
The default operation is Infinity.
//Initialize the SfDiagram.
SfDiagram diagram = new SfDiagram();
//Initialize the scroll setting with auto scroll limit and scrolling area.
diagram.ScrollSettings = new ScrollSettings()
{
AutoScrollLimit = ScrollLimit.Limited,
ScrollableArea = new Rect(0,0,1500,1500),
};
AutoScrollLimit | Output |
---|---|
Infinity | ![]() |
Diagram | ![]() |
Limited ScrollableArea = (0,0,1500,1500) |
![]() |