public void CenterPart( Part part, Action afterwards )
Parameters
- part
- afterwards
- an
Action
to be performed after the animation is finished; may be null
Action
to be performed after the animation is finished; may be null
public void CenterPart( Part part, Action afterwards )
Action
to be performed after the animation is finished; may be nullThe HorizontalContentAlignment and VerticalContentAlignment properties need to be "Stretch" if the DiagramBounds are smaller than the viewport. But in any case, the part might not be centered if the panel cannot be scrolled far enough.
If you just want to make sure the panel is scrolled so that a part is visible, to avoid unnecessary scrolling when the part is already visible, call MakeVisible.