My document view exceeds the horizontal extent of the screen and becomes scrollable. I need to enable or disable horizontal scrolling only when needed. Can anyone navigate me how to proceed with the same?
Since Forms does not provide this function ,so i'm afraid you have to use custom renderer.
To disable the horizontal scrolling of NSScrollView , you could set the documentView property ,make the documentView width equals to screen width .
Something like this
//disable horizontal scrolling
var contentView = new NSView(new NSRect(0, 0, screenWidth, Control.DocumentView.Height));
Control.DocumentView = contentView;
Thanks for the answer. That works great as expected. However I also want to enable the diagonal scrolling which means the view has to be scrolled in 60 degree axis. Currently, I could only able to scroll either in horizontal direction or vertical direction one at a time but not simultaneously. Is it possible to do so?
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies