Reading this thread helped me setting up a scrollable RadDiagram control, but I still have an issue.
I've added the shapes to the diagram in the window's constructor, and did something like this after it:
TreeLayoutSettings settings =
TreeLayoutType = TreeLayoutType.TreeDown,
VerticalDistance = 20,
The layout is very nice, but since I have a lot of items on my diagram, and the diagram area is small, lots of shapes are out of the view. My issue is, that altough the scrollbars are visible, they aren't active/enabled at first load. After zooming, panning or any interaction with the diagram the scrollbars are activated and working as intended/expected. But I need to interact with the diagram to enable the scrollbars. (I also read this thread
, as it seems similar to my problem.)
If I call the AutoFit() method after the Layout(), then the scrollbars are active, but my diagram is shrunk. Better, but not what I really wanted. (If your diagram is huge, then it won't be readable.)
(One more thing: if you call AutoFit() and the scrollbars are set to Visible, then the diagram fits it's content _exactly_ to it's size. Because of this, the scrollbars become active, but there is nothing to scroll.)
Maybe a measurement is missing in the Layout() call, if the diagram has visible scrollbars. Is there a method to call to activate the scrollbars after the Layout() call?