Northwoods.GoWPF 1.3.5 Assembly
CenterPart(Part,Action) Method
See Also  Send Feedback
Northwoods.GoXam Namespace > DiagramPanel Class > CenterPart Method : CenterPart(Part,Action) Method

part
afterwards
an Action to be performed after the animation is finished; may be null
Center a Part's bounds within this viewport.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub CenterPart( _
   ByVal part As Part, _
   ByVal afterwards As Action _
) 
C# 
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 DiagramPanel.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.

Requirements

See Also

© 2012 All Rights Reserved.