I want to both read and write the scroll position (horizontal and vertical) inside an NSScrollView using MonoMac. I do this because I want to save and load several different states which include the scroll positions. Instead of having several different NSScrollViews I just have a single one and want to change it whenever the state changes.
I have so far figured out that I am interested in the DoubleValue of the NSScrollView's HorizontalScroller and VerticalScroller. But I cannot for my life figure out how to detect when this value changes so I can save it. I need to detect the change no matter if the user is clicking the scroll bar, dragging it, or using either a mouse or a trackpad. As long as the scrollbar moves, I want to save the position.
Any suggestions?