I have a user control which paints content in OnRender
. The Height
of that control grows by and by.
I added this control to a ScrollViewer
. The control does only repaint the currently visible area (viewport
) (+/- a view lines for smoother scrolling).
Everything works fine so far...
But since the control usualy grows up to a few hundred thousands of pixels I want to keep the Height
of my control as small as possible and provide a different Height
value to bind to the ScrollableHeight
of the ScrollViewer
(same goes for VerticalOffset
). But there is no setter for ScrollableHeight
. It binds automatically to the Height of my Control. Neither can I override Height.
How can I customize my ScrollViewer
(or VerticalScrollbar
) to keep the real Height
of my control small?