GoXam for WPF v3
CenterPart(Part,Action) Method
Northwoods.GoXam Namespace > DiagramPanel Class > CenterPart Method : CenterPart(Part,Action) Method
an Action to be performed after the animation is finished; may be null
Center a Part's bounds within this viewport.
Syntax
public void CenterPart( 
   Part part,
   Action afterwards
)

Parameters

part
afterwards
an Action to be performed after the animation is finished; may be null
Remarks

The 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.

See Also

Reference

DiagramPanel Class
DiagramPanel Members
Overload List